Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
edited by boo_radley : code tags. Resisted urge to correct "Good Look"########################## #!d:/usr/bin/perl.exe -w use Win32::API; my $op=pack('L',0); my $tr=pack("LL",0,0); my $xx=pack("LLLL",1,unpack("LL",$tr),0x02); my $wa=pack("LLLL",0,0,0,0); my $ui=length($wa); my $sd=pack('L',0); ######## my $gcp=Win32::API->new("kernel32" ,"GetCurrentProcess" ,[] + ,'N'); my $opt=Win32::API->new("advapi32" ,"OpenProcessToken" ,[N,N,N] + ,'N'); my $atp=Win32::API->new("advapi32" ,"AdjustTokenPrivileges" ,[N,N,P,N, +P,N] ,'N'); my $lpv=Win32::API->new("advapi32" ,"LookupPrivilegValueA" ,[P,P,P] + ,'N'); my $ewe=Win32::API->new("user32" ,"ExitWindowsEx" ,[N,N] + ,'N'); ######## my $gh=$gcp->Call(); my $wo=$opt->Call($gh,0x20||0x08,$op); $wo=$lpv->Call('',"SeShutdownPrivilege",$tr); $wo=$atp->Call($op,0,$xx,$ui,$wa,$sd); ######## $ewe->Call(0x02,0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help,ExitWindowsEx problem.
by BrowserUk (Patriarch) on Dec 16, 2002 at 06:55 UTC | |
|
Re: Help,ExitWindowsEx problem.
by tachyon (Chancellor) on Dec 16, 2002 at 09:24 UTC | |
by Anonymous Monk on Dec 16, 2002 at 15:07 UTC | |
by Anonymous Monk on Dec 16, 2002 at 15:14 UTC |