0
I need to start my application on Windows startup.
I used this command to set the registry:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "ProgramName" /d "ProgramPath" /t REG_EXPAND_SZ
I checked, and the registry is ok. I tried to put on HKEY_CURRENT_USER too.
But both isn't working. My application need root privileges to work.
Did I forgot something to get it working?
Thanks
Have you tried to schedule a task? – ddbug – 2018-06-18T19:21:00.693
Yes, I did. But I was having problems whit it. Sometimes it didn't work. And any user can download this software, so it is interesting to do it programmatically directly on software. – dm707 – 2018-06-18T19:29:37.163
Software that runs when Windows starts and has high privileges in Windows usually is a service. Microsoft documentation describes how to make a service. Alternatively, there is the "srvany" program that allows easily run certain programs as a service. – ddbug – 2018-06-18T21:24:59.490
I think your biggest problem is you are using a reg_expand_sz when everything else there uses REG_SZ – cybernard – 2018-06-19T03:11:10.650