Can a Windows Service launch an application with administrative privileges in Windows Vista?
Posted on 2010-08-27
I've been reading around and trying all kinds of things to make my Windows Service launch another application (either by ShellExecute, ShellExecuteEx, or CreateProcess, etc.) with administrative privileges in Windows Vista.
It is unclear to me whether or not this is even possible.
Right now, I have it where the service launches the application, and in task manager the application's "User Name" says the name of an administrative account, but the application won't do what I want it to (specifically control the mouse by using the .NET Cursor.Position and invoke mouse_event() from user32.dll) unless I manually stop the application from task manager, right click on it in its folder and select "Run as administrator".
Is there a way to do this? Any way at all?
Thanks for your help!