Run process as administrator from Windows service

I am working on a sample as I have a windows service that starts a process (UserApplication.exe). To start a Windows service form I got a sample of this link http://www.codeproject.com/Articles/35773/Subverting-Vista-UAC-in-Both-32-and-64-bit-Archite .

This works great. But the problem is that the running process (UserApplication.exe) is calling the FilterAttach () API. When this process (UserApplication.exe) calls this API then it fails with - access denied.

But if I start the same process (UserApplication.exe) by right clicking and running it as admin then it works fine without error and everything works fine.

please let me know how to start the process as an administrator creating the service.

Also I tried to set the manifest file of this exe to run as admin but without help ( http://msdn.microsoft.com/en-us/library/bb384691.aspx )

+3
windows visual-c ++ winapi service


source to share


No one has answered this question yet

See similar questions:

five
Avoiding UAC but starting the elevated process using Windows Service

or similar:

2453
How do I install pip on Windows?
2195
Is there an equivalent to "which" on the Windows command line?
1975
How do I know which process is listening on a port on Windows?
1141
How can I develop for iPhone using Windows development machine?
362
Difference between the Local System account and the Network Service account?
136
Automatic process privilege escalation?
2
Starting an interactive process with Windows Service in Windows 7
1
Process start from application started from Windows 7 service
0
Is there a way to do Interactive Service on Windows 7 (Python)?
0
Start an interactive process with Windows Service in Windows 10



All Articles
Loading...
X
Show
Funny
Dev
Pics