Ok. I have my entire program created and working, but the only thing it needs to work is that one of its files is in the startup. Can I create a .bat or .cmd file that will move it to the startup of any computer?
Printable View
Ok. I have my entire program created and working, but the only thing it needs to work is that one of its files is in the startup. Can I create a .bat or .cmd file that will move it to the startup of any computer?
"..of any computer..."
On windows the startup is a registry entry that tells the system to run a file on certain path, you can do it through the api functions; also nsis installer have its own script language that allows to work with the registry.
The registry keys are
(there are also other keys: Run, RunOnce, RunServices, RunServicesOnce)Code://for single user installation
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
//for all computer users
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
Niara