C# Process.Start() administrator privileges on Windows Embedded POSReady 2009 -
i attempting call batch file administrator privileges in c# code using system.diagnostic
's process.start()
mentioned here: how start process administrator mode in c# .
i call built executable elevated command prompt runas /user:administrator program.exe
. subprocess succeeds when called outside of program, fails @ administrator tasks when called program.
i have attempted using manifest , setting process.verb = "runas"
, no luck there.
the subprocess installs driver , program verifies version number if that's relevant.
thank help!
make sure have following lines in application's manifest:
<requestedprivileges xmlns="urn:schemas-microsoft-com:asm.v3"> <requestedexecutionlevel level="requireadministrator" uiaccess="false" /> </requestedprivileges>
your application spawn other processes @ same elevation level itself. meaning if application runs non-administrator, every process spawns run without administrative permissions, too.
make sure parent application has elevated permissions before start batch file.
Comments
Post a Comment