Question autostart the application when windows starts

Joined
Apr 28, 2016
Messages
5
Programming Experience
1-3
what is the best way to add the vb.net application in startup apps of windows ? I got this code

VB.NET:
Dim regKey As Microsoft.Win32.RegistryKeyregKey
regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
regKey.SetValue("YourApplicationName", "YourInstallPath")
regKey.Close()

But it need the installpath, i want to add this startup code in the dynamic compile code to produce exe using codedom, so how would i define the installpath ?
 
Back
Top