Skip to content

Commit

Permalink
Merge pull request #4 from windowslogic/master
Browse files Browse the repository at this point in the history
Added ability to add application to Startup folder.
  • Loading branch information
Noxyntious authored Oct 7, 2022
2 parents 0e3335b + 8cd95d9 commit c9409bb
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 38 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SHitSHell
The worst Windows """shell replacement""" ever.
The worst Windows "shell replacement" ever.
# Downloads
Downloads in the [Releases tab.](https://github.com/Noxyntious/SHitSHell/releases)
# Using
Just double click the exe file. I hope you know how to do that.
# Does it suck?
yes.
Less.
# What programming language is this thing made in?
mmm tasty vb.net mmmmmmm
mmm tasty vb.net mmmmmmm / Getting better...
10 changes: 10 additions & 0 deletions README.md.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SHitSHell
The worst Windows """shell replacement""" ever.
# Downloads
Downloads in the [Releases tab.](https://github.com/Noxyntious/SHitSHell/releases)
# Using
Just double click the exe file. I hope you know how to do that.
# Does it suck?
yes.
# What programming language is this thing made in?
mmm tasty vb.net mmmmmmm
12 changes: 6 additions & 6 deletions SHitSHell/My Project/Application.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions SHitSHell/My Project/Application.myapp
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>true</MySubMain>
<MainForm>Form1</MainForm>
<MainForm>SHitSHell</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>0</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>
</MyApplicationData>
14 changes: 7 additions & 7 deletions SHitSHell/Form1.Designer.vb → SHitSHell/SHitSHell.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
37 changes: 23 additions & 14 deletions SHitSHell/Form1.vb → SHitSHell/SHitSHell.vb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Public Class Form1
Imports IWshRuntimeLibrary

Public Class SHitSHell

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' thanks, shady ass website!! :)
Expand All @@ -24,7 +26,9 @@
End Sub

Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
On Error GoTo errorHandler ' yanderedev

'Checks the combobox for a string, then runs a process based on the selected string. TIP: For things like this, it's best to use buttons with pretty icons.

If ComboBox1.Text = "Explorer" Then
Process.Start("explorer.exe")
ComboBox1.Text = ""
Expand All @@ -41,33 +45,38 @@
Process.Start("control.exe")
ComboBox1.Text = ""
ElseIf ComboBox1.Text = "Settings (Windows 10)" Then
Process.Start("ms-settings:")
ComboBox1.Text = ""

Try
Process.Start("ms-settings:")
ComboBox1.Text = ""
Catch
MsgBox("This feature only works on Windows 8 or later.", MsgBoxStyle.Critical, "Exception")
End Try

End If
Exit Sub
errorHandler:
MsgBox("you arent even running windows 10 what are you doing")
Resume Next
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.Close()
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
MsgBox("way too lazy to code this in so just copy this exe file to %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup")
End Sub 'coming in 2.0 i swear

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
'Adds the application to the Startup folder.

Dim WshShell As WshShell = New WshShell()
Dim ShortcutPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Startup)
Dim Shortcut As IWshShortcut = CType(WshShell.CreateShortcut(System.IO.Path.Combine(ShortcutPath, Application.ProductName) & ".lnk"), IWshShortcut)
Shortcut.TargetPath = Application.ExecutablePath
Shortcut.WorkingDirectory = Application.StartupPath
Shortcut.Description = "SHitSHell"
Shortcut.Save()
MsgBox("SHitSHell has been added to the Startup folder.", MsgBoxStyle.Information, "Information")
End Sub

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
TextBox1.Text = TimeString
TextBox2.Text = DateString
End Sub 'i think this is like the only not jank piece of code

Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged

End Sub
End Class
30 changes: 25 additions & 5 deletions SHitSHell/SHitSHell.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.vb">
<Compile Include="SHitSHell.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.vb">
<DependentUpon>Form1.vb</DependentUpon>
<Compile Include="SHitSHell.Designer.vb">
<DependentUpon>SHitSHell.vb</DependentUpon>
<SubType>Form</SubType>
</Compile>
<Compile Include="My Project\AssemblyInfo.vb" />
Expand All @@ -112,8 +112,8 @@
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.vb</DependentUpon>
<EmbeddedResource Include="SHitSHell.resx">
<DependentUpon>SHitSHell.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
Expand Down Expand Up @@ -146,5 +146,25 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<COMReference Include="IWshRuntimeLibrary">
<Guid>{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Shell32">
<Guid>{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

0 comments on commit c9409bb

Please sign in to comment.