How I can start a program when the computer will start? But no one can see the program on start up. is there any way to start a program without keep it on start up. (VB Project)
Thanking you
Rummy
Printable View
How I can start a program when the computer will start? But no one can see the program on start up. is there any way to start a program without keep it on start up. (VB Project)
Thanking you
Rummy
you must add your exe file path in following registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
This wont show the path in startup but it will run your program at startup.
or in Windows 95/98 you can set it in your Win.ini file...
For example:
LOAD=C:\App.exe
But I would also recomment the reg key... :)
SaveSettingString HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "yourappname", App.Path & "\yourapp.exe"
There is no VB function "SaveSettingString". Do you have the declarations and code for this routine? I assume it uses complex registry APIs.Quote:
Originally posted by soothu kusu
SaveSettingString HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "yourappname", App.Path & "\yourapp.exe"
The VB SaveSetting command wil always write to sub-keys in HKey_Current_User\Software\VB and VBA Program Settings. So it won't look in the registry at the correct point.
Correct...
Search http://www.vbworld.com for registry saving... I have my API from there...