Autostart your application with Windows
March 22nd, 2010
This is a frequently asked question and its very easy to implement it in .net.
Code for adding the application to start with windows
Dim regKey As RegistryKey
regKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
regKey.SetValue(Application.ProductName, Application.ExecutablePath)
regKey.Close()
Code for removing the application from startup
Dim regKey As RegistryKey
regKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
regKey.DeleteValue(Application.ProductName)
regKey.Close()
.jpg)
Recent Comments