Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by BrowserUk (Pope)
on Oct 20, 2011 at 22:56 UTC ( #932781=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Win32::Process::Create with elevated privileges on Windows 7
Download Code
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 :)
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".

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (15)
As of 2014-08-27 13:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (238 votes), past polls