Archive: How to automatically run process on startup elevated?


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?


You could instead try creating a shortcut in $SMSTARTUP and set the run as administrator properly (ShellLink plug-in).

Stu


I'll do that. Thanks


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.


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.


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.

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.

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