Running iisreset

L

Lee

Hello all,

I am trying to perform a reboot on my server from an asp
page. I have a link on my page that, when clicked on,
redirects to a .stm page that displays a message about
the server rebooting and executes the following command:
<!-- #exec CMD="cmd.exe /C iisreset /REBOOT" -->. When I
click on the link the message is displayed but the server
does not reboot. I know that in order for the #exec
command to work you have to add a key in the registry,
and disable anonymous access to the folder containing
the .stm page. I have done both of these and yet I still
can't get the server to reboot. Can anyone help me with
this, or know another way that I can browse to an asp
page on the server and perform a reboot?
 
R

Ray at

I reboot my server using:

<%
Server.CreateObject("WSCript.Shell").Run "cmd.exe /c iisreset /reboot"
%>

in an ASP page in a directory with anonymous access disabled.

Ray at work

This is what I assume I use
 
A

Aaron Bertrand - MVP

Cool, what's the URL and credentials? I'll schedule a VBS script to hit it
every 5 minutes. Mwahahahaha. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top