For example Microsoft Office automatically starts up when Windows starts unless told otherwise via msconfig.
Is it possible for a programme made in VB6 to start up with Windows?
If so, could anybody tell me the code?
Thanks,
Piratescotty.
Printable View
For example Microsoft Office automatically starts up when Windows starts unless told otherwise via msconfig.
Is it possible for a programme made in VB6 to start up with Windows?
If so, could anybody tell me the code?
Thanks,
Piratescotty.
you can do it by adding your app path to the Software\Microsoft\Windows\CurrentVersion\Run registry key, search the forum for registry theres loads of sample code
here is the easiest way...
VB Code:
Set wshshell = CreateObject("WScript.Shell") wshshell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\[B]YOUR_APP_NAME[/B]", App.Path & "\" & App.EXEName & ".exe"
you can do it with API also.
Would I put that code in the Form Load?
I'm pretty new to the registry stuff, so does anyone have any examples as I have no idea what I'm looking for!
well if you wanted it to set the key on form load then yes, or maybe you want to put it in a button? its up to you
Cheers 182, it worked! :thumb:
Hi, sorry i know this is an older thread. But how would i remove that from starting up everytime by pressing a button. Thanks!Quote:
Originally Posted by the182guy