3

I am trying to run programs from another .NET program that requires elevation using the impersonation option of the Process.Start (System.Diagnostics) method. The user for impersonation is a local administrator. The O/S is 2008 and UAC is turned on. Whenever calling process start I'm getting a Win32 permission error:

"The requested operation requires elevation"

Dani
  • 461
  • 2
  • 5
  • 7

2 Answers2

5

If the .NET application you are calling is configured properly in the app.manifest, you don't have to specify anything in the Process.Start call - the UAC will appear automatically.

app.manifest setting:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
testalino
  • 5,474
  • 6
  • 36
  • 48
0

Some information you might find helpful:

http://www.codeproject.com/KB/cs/zetaimpersonator.aspx

http://msdn.microsoft.com/en-us/library/system.security.principal.windowsidentity.impersonate%28VS.71%29.aspx

code4life
  • 15,655
  • 7
  • 50
  • 82
  • Unfortunately both links were not helpful. From what I've read so far it seems that as part of the UAC it is not possible to open a process with impersonation and also run it elevated at the same time. – Dani Oct 17 '10 at 08:35