Hey there,
I would like to start an executable (test.exe) that has been set to start with administrator privileges. This means I set it up manually by right clicking on it (Properties), going to Compatibility tab, and checking the bottom checkbox (run as administrator).
use Win32::Process;
Win32::Process::Create($proc, 'C:\test.exe', 'test.exe', 0, NORMAL_PRI
+ORITY_CLASS, '.')
I'm running my perl script as a normal user, and it can't start this executable mentioned above, because it can't get admin rights. This makes sense, but when I start test.exe manually (from Total Commander or Windows Explorer) it blanks out the screen and asks for approval of giving it elevated privileges. I want Win32::Process::Create do the same, because now it doesn't ask anything, it just fails to start the application.
Is there a workaround using
Win32::Process?
Alternatively, is there a way or a special parameter that would ask for administrator privileges before trying to create a process out of this application?
My
Win32::Process version is
0.14 and I'm running Windows 7 with UAC enabled.
Thanks in advance,
stringZ
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.