Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Win32::Process::Create with elevated privileges on Windows 7

by Jenda (Abbot)
on Oct 21, 2011 at 08:28 UTC ( #932840=note: print w/ replies, xml ) Need Help??


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
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://932840]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-10-21 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (95 votes), past polls