Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remote shutdown

Status
Not open for further replies.

DanielB

Programmer
Mar 27, 2002
4
AU
I have written a very small executable which shuts down the computer using the ExitWindowsEx API call. It works fine when you execute it as usual and shuts down the computer. I now want to put it in my scripts directory so i can remotely shut down my computer (yes i'm aware of the risk:) ). My scripts folder is set to Scripts & executables and i have even tried adding the IIS Launch Process user to the Administrators group in User Manager but this seems to have had no effect. I am guessing it is something to do with IIS not allowing web execuatables to do things like that. I would like to turn off this protection so executables have standard access to the computer but i'm not sure how.

Any ideas? Thanks, Daniel
 
Why not try running the NT command line 'shutdown.exe'? Easy to do from a CGI app (it would just be `shutdown`; in Perl) but I'm not going to try it just now thanks :)

Oh, you need the NT resource kit installing for Shutdown.exe to be present.

For Win 2K try looking in the Windows 2000 help (Start | Help) for "shutdown, scripts" - it has some info in there.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top