How do I request user right: SeShutdownPrivilege
- From: "George Valkov" <a@xxxxx>
- Date: Fri, 13 Jul 2007 15:21:42 +0300
Windows 2003 server SP2 enterprise,
IIS, ASP enabled, execute mode: script and executables.
How do I request this user right:
SeShutdownPrivilege
I do not seem to have it, when I run an ASP script on the server
as Asministrator. I want to restart the server from ASP.
Please give me either ASP or C++ implementation how to request
this user right... And thank You for any good web link too!
// details:
// login as administrator to local web site and GET:
// http://localhost/restart_test.exe
// Shutdown in progress dialog box is displayed on server's console.
// this is the desired behaviour, but I want to do it from ASP.
// login as administrator to local web site and GET:
// http://localhost/test.asp
// in the ASP I execute this server side script:
var WshShell=Server.CreateObject("WScript.Shell");
WshShell.Exec("C:\\Inetpub\\restart_test.exe");
var stdOutText=objCmd2.StdOut.Readall();
response.write(stdOutText);
// source code for restart_test.cpp
InitiateSystemShutdown(NULL, NULL, 300, false, true);
printf("[errorCode=%d]", GetLastError());
// The web page returns:
// [errorCode=5] // 5 = Access Denied
// this means that I am missing this right:
// SeShutdownPrivilege
.
- Follow-Ups:
- Re: How do I request user right: SeShutdownPrivilege
- From: jwgoerlich
- Re: How do I request user right: SeShutdownPrivilege
- Prev by Date: Re: USER AND TERMINAL SERVER
- Next by Date: Re: How do I request user right: SeShutdownPrivilege
- Previous by thread: Domain Controllers grabbed Certificates from wrong Cert Authority
- Next by thread: Re: How do I request user right: SeShutdownPrivilege
- Index(es):
Relevant Pages
|