in reply to Re: Win32::Process::Create with elevated privileges on Windows 7
in thread Win32::Process::Create with elevated privileges on Windows 7

And if you want to run-as-administrator a program that's not set to run only with admin rights, try

Win32::FileOp::ShellExecute( runas => 'theProgram.exe' )

To run it as a different user use "runasuser" instead of "runas".

Jenda
Enoch was right!
Enjoy the last years of Rome.

  • Comment on Re^2: Win32::Process::Create with elevated privileges on Windows 7
  • Download Code

Replies are listed 'Best First'.
Re^3: Win32::Process::Create with elevated privileges on Windows 7
by stringZ (Acolyte) on Oct 21, 2011 at 10:43 UTC
    Another good one, thanks. Other people who read this should note that this solution only works on Windows 7 (or Vista - haven't tested). On XP it won't start anything with "runas".
Re^3: Win32::Process::Create with elevated privileges on Windows 7
by stringZ (Acolyte) on Nov 03, 2011 at 02:13 UTC