I have a c# app that launches an elevated CMD prompt window as an admin user. I'm using CreateProcessAsUser
to impersonate the admin user.
I launch the CMD.EXE in administration mode and pass in the following command line programatically
-Verb RunAs -ArgumentList '/k start regsvr32.exe "C:Program Files\mydll.dll"
However, I always receive the following error?
Would anybody know why I can't run Regsvr32.exe from an elevated command prompt?