A
AirYT
Done a bunch of searching on this topic and i have come up with nothing.
I have a .vbs script that i wish to execute by calling an asp page.
i am working on a W2K server with IIS5.0 & SP4.
My stopwebsite.vbs file is as follows:
===
On Error Resume Next
fullPath = "IIS://Localhost/W3svc/57"
Set oServer = GetObject(fullPath)
If Err <> 0 Then
Display "Unable to open " & fullPath & "."
End If
oServer.Stop
If Err <> 0 Then
Display "Unable to stop web server " & fullPath & "."
End If
Sub Display(Msg)
' WScript.Echo Now & ". Error Code: " & Hex(Err) & " - " & Msg
End Sub
===
NOTE that display doesn't do anything
my stopwebsite.asp script is as follows:
===
<%
On Error Resume Next
Set objScriptShell = Server.CreateObject("Wscript.Shell")
strCommand = "cscript.exe //b d:\inetpub\websites\admin\stopwebsite.vbs"
intReturn = objScriptShell.Run( strCommand )
response.write( "Command returned: " & intReturn )
Set objScriptShell = Nothing
if err.number <> 0 then
response.write "<hr>Error detected: " & err.number & ": " &
err.Description & "<br/>"
response.end
End if
%>
===
Normally i get that the command has executed successfully (ie. i get a 0
returned).
however the script doesn't actually run.
NOTE: i can run the command ("cscript.exe //b
d:\inetpub\websites\admin\stopwebsite.vbs") from a command line when logged
in as administrator successfully
I can also simply double click on the vbs (which i assume is executed by
wscript) from file explorer and it works successfully.
Things i have tried & applied:
the asp script is running on it's own virtual website with anonymous access
disabled. As such i am logging in as administrator when prompted.
i have tried different user permissions on the asp script & the vbs script.
at this point, everyone has full access to both scripts. this did not seem
to help.
any ideas??
thanks in advance.
yt
PS -- when i was locking down my server, i removed the built-in iis
administration website and probably the files that go with it. is there a
way to restore that without removing & reinstalling iis?
I have a .vbs script that i wish to execute by calling an asp page.
i am working on a W2K server with IIS5.0 & SP4.
My stopwebsite.vbs file is as follows:
===
On Error Resume Next
fullPath = "IIS://Localhost/W3svc/57"
Set oServer = GetObject(fullPath)
If Err <> 0 Then
Display "Unable to open " & fullPath & "."
End If
oServer.Stop
If Err <> 0 Then
Display "Unable to stop web server " & fullPath & "."
End If
Sub Display(Msg)
' WScript.Echo Now & ". Error Code: " & Hex(Err) & " - " & Msg
End Sub
===
NOTE that display doesn't do anything
my stopwebsite.asp script is as follows:
===
<%
On Error Resume Next
Set objScriptShell = Server.CreateObject("Wscript.Shell")
strCommand = "cscript.exe //b d:\inetpub\websites\admin\stopwebsite.vbs"
intReturn = objScriptShell.Run( strCommand )
response.write( "Command returned: " & intReturn )
Set objScriptShell = Nothing
if err.number <> 0 then
response.write "<hr>Error detected: " & err.number & ": " &
err.Description & "<br/>"
response.end
End if
%>
===
Normally i get that the command has executed successfully (ie. i get a 0
returned).
however the script doesn't actually run.
NOTE: i can run the command ("cscript.exe //b
d:\inetpub\websites\admin\stopwebsite.vbs") from a command line when logged
in as administrator successfully
I can also simply double click on the vbs (which i assume is executed by
wscript) from file explorer and it works successfully.
Things i have tried & applied:
the asp script is running on it's own virtual website with anonymous access
disabled. As such i am logging in as administrator when prompted.
i have tried different user permissions on the asp script & the vbs script.
at this point, everyone has full access to both scripts. this did not seem
to help.
any ideas??
thanks in advance.
yt
PS -- when i was locking down my server, i removed the built-in iis
administration website and probably the files that go with it. is there a
way to restore that without removing & reinstalling iis?