How do I give my app the option to load when Windows 2000 starts up?
Thanks
Printable View
How do I give my app the option to load when Windows 2000 starts up?
Thanks
The option? Put it in the start menu?
but HOW do I do that on lets say a checkboxes on change event?
thanks
You mean a choice to the user of whether or not to add the exe to the start menu?
yes for sure
???
Well if they tick the box, make an entry in the reg at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
If they untick it, remove said entry
thanks chrisjk but this is the first time I ever mess with the registry and I don't even know how to do that.
okay. Requires attached module
VB Code:
Private Sub Check1_Click() If Check1.Value = 1 Then 'enter key SaveSettingString HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", App.Title, App.Path Else 'remove it DeleteValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", App.Title End If End Sub Private Sub Form_Load() Check1.Caption = "Load " & App.Title & " at startup" End Sub
this is good but when I unload my app and load it again, the chekc box is not checked. How can I check if the setting is made?
thanks
hold on is SOFTWARE the name of my app?
See I am just running a compiled exe right now. I didn't install it through a set up package. Does this pose a problem?
1) yeah I realised that, I'm trying to find a way of querying the existance of a key
2) no, leave it as it is.
thanks I will await ur response!
:rolleyes: