Can some one assist me how can i make my project load directly when the windows will start...
please need help on this..
Printable View
Can some one assist me how can i make my project load directly when the windows will start...
please need help on this..
You need to add an entry of your application in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run OR
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Just open the registry editor and go to the above locations. You will see a list of applications that runs when OS is started. You need to add an entry for your application here.
not just on my pc..
When others will use also to be same ..!!
You need to create a setup for your application which will not only deploy your application but also create a key in the registry so that your application can run when Windows starts.
ahh ok il try that way thanks for your help..
Could also make an option in your programs settings for "Start On Windows Load" where if the user sets to true/false a shortcut to the application will be created/deleted in/from the Startup folder of your Start Menu. If you are hesitant about messing with the registry then this is a simple method to achieve your goal.
Hi,
I think the easiest way would be to put a shortcut to the application.exe file in the 'C:\Documents and Settings\All Users\Start Menu\Programs\Startup'
folder. You can make the setup do this automatically by right clicking 'File
System on Target Machine' in the project output window and selecting 'Add
Special Folder'. Just select 'User's Start Menu' and you are away.
The application will automatically terminate when you terminate the
operating system.
Hope it helps,
sparrow1
Can some one assist me how can i make when user checks on check box the application start on windows load when user unchecks the application not start on windows load..?!
can some one assist me..?!
vb.net Code:
Private Sub chkStartup_CheckedChanged( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs _ ) Handles chkStartup.CheckedChanged Dim regKey As Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True) If chkStartup.Checked = True Then regKey.SetValue(Me.GetType.Assembly.GetName.Name, Me.GetType.Assembly.Location) Else regKey.DeleteValue(Me.GetType.Assembly.GetName.Name) End If regKey.Close() regKey = Nothing End Sub
id dint get how to make this erectly can u assist me a bit easier...?!
where i have to edit that hkey and so on...
Quote:
Originally Posted by Deepak Sakpal
I have already said that, you need to do it through the application setup. There one more way to do it. You can use some part of the code from my last post to add your application to the system start up.Quote:
Originally Posted by TetovaBoy
Just make sure that it does not conflicts with the Check box code.vb.net Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AddAppToStartup() End Sub Private Sub AddAppToStartup() Dim regKey As Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True) regKey.SetValue(Me.GetType.Assembly.GetName.Name, Me.GetType.Assembly.Location) regKey.Close() regKey = Nothing End Sub