gencha
11th March 2011 11:48 UTC
How to automatically run process on startup elevated?
Our software should install an application that runs every time the system boots. This application performs various system-configuration tasks that require elevated privileges. So when the application starts, a UAC window will pop up. But the systems our software runs on are not operated by users. So there is noone to confirm the dialog.
Starting the application itself is no problem. I simply placed an entry at HKLM\Software\Microsoft\Windows\CurrentVersion\Run. But how do I automatically start it elevated?
Afrow UK
11th March 2011 12:33 UTC
You could instead try creating a shortcut in $SMSTARTUP and set the run as administrator properly (ShellLink plug-in).
Stu
gencha
11th March 2011 12:50 UTC
I'll do that. Thanks
gencha
11th March 2011 13:17 UTC
Ok, I tried that but am a little confused about the results.
The application does not seem to run when the system is rebooted and when I start it manually, I still get prompted by UAC.
Takhir
11th March 2011 18:15 UTC
If your application can work without user interface and don't need network access permissions, decorate it as service and run from LOCAL_SYSTEM account.
gencha
14th March 2011 16:22 UTC
Originally posted by Takhir
If your application can work without user interface and don't need network access permissions, decorate it as service and run from LOCAL_SYSTEM account.
Yeah, that's what I did now. But networking works just fine with the LocalSystem account.
Takhir
14th March 2011 18:10 UTC
Originally posted by gencha
But networking works just fine with the LocalSystem account.
Fine, but partly :) For example, network shares access will be a problem. But it is possible to run service from real account.
gencha
14th March 2011 19:03 UTC
Originally posted by Takhir
Fine, but partly :) For example, network shares access will be a problem. But it is possible to run service from real account.
Oh, I see. I only need raw TCP communication anyway.
Cheers