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 musing on the Monastery: (14)
As of 2015-07-06 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls