Win32::Process::Create with elevated privileges on Windows 7by stringZ (Acolyte)
|on Oct 20, 2011 at 22:48 UTC||Need Help??|
stringZ has asked for the
wisdom of the Perl Monks concerning the following question:
Hey there, I would like to start an executable (test.exe) that has been set to start with administrator privileges. This means I set it up manually by right clicking on it (Properties), going to Compatibility tab, and checking the bottom checkbox (run as administrator).
I'm running my perl script as a normal user, and it can't start this executable mentioned above, because it can't get admin rights. This makes sense, but when I start test.exe manually (from Total Commander or Windows Explorer) it blanks out the screen and asks for approval of giving it elevated privileges. I want Win32::Process::Create do the same, because now it doesn't ask anything, it just fails to start the application.
Is there a workaround using Win32::Process?
Alternatively, is there a way or a special parameter that would ask for administrator privileges before trying to create a process out of this application?
My Win32::Process version is 0.14 and I'm running Windows 7 with UAC enabled.
Thanks in advance,