Thanks for your reply, but that's not what I'm looking for. I should have described my problem more precisely. I'm working on a Perl program that will be run on different Windows Server machines (actually, it has a cmd wrapper that launches the actual Perl program embedded inside it). On Windows Server 2008 it requires the user to confirm the elevated privilege dialog, which I can't get to show up. I found a solution described here:
http://stackoverflow.com/questions/150782/windows-vista-how-to-execute-a-exe-program-in-the-cmd-as-an-administrator/150911#150911 It is based on a weird fact, that Windows with UAC launches the elevated privilege box when there is 'runas' string at the end of arguments. However, it required using two separate scripts, one of which is a VBS script and the other is cmd. I've managed to cut it down just to the VBS script, but that's still not what I'm looking for, since my wrapper is cmd. The bottom line is that I'm looking for a solution to show the elevated privileges dialog box. Greg Aiken pisze: > you can interactively control it by invoking an elevated cmd window, then > running your perl program in that elevated window. > > either, > > a. browse to c:\windows\system32, then put cursor on 'cmd', right-click, > 'run as administrator', or > b. taskbar, windows logo, search field, type 'cmd' in search field, then if > 'cmd' is shown at the top of that window as a possible option, right-click > 'cmd' at top of that window > > the only other way to do this is to use a 'manifest' file. if you have a > properly configured manifest file, you would copy the manifest file to the > perl\bin directory. you would name it perl.exe.manifest. > > or, a Microsoft utility, I think called 'mc.exe' allows one to embed the > manifest into the exe. in which case, you would embed this manifest, > instructing to elevate privilege, directly into perl.exe > > the problem with manifest is that its not 'switchable' on or off. if you > use the manifest, all perl programs will be elevated. > > the interactive method allows you to control privilege elevation at runtime. > > -----Original Message----- > From: perl-win32-users-boun...@listserv.activestate.com > [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of > rocku > Sent: Wednesday, August 26, 2009 4:41 AM > To: perl-win32-users@listserv.ActiveState.com > Subject: Win2008 / Vista UAC - elevage privileges > > Hi, > is there a way to request administrator token from within a Perl script under Win2008 or Vista? > > -- > rocku > _______________________________________________ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > > > > _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs