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

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


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Win32::Process::Create with elevated privileges on Windows 7
by Jenda (Abbot) on Oct 21, 2011 at 08:28 UTC

    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.

      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^2: Win32::Process::Create with elevated privileges on Windows 7
by stringZ (Acolyte) on Oct 20, 2011 at 23:04 UTC
    Thank you. This one works, helped a lot :)