M
Max
I must stop IIS service from asp page.
I think that use a vbs file that execute from asp page :
asp page:
<%
set wshell = server.createobject("wscript.shell")
wshell.run "cscript d:\inetpub\wwwroot\stopservice.vbs",2,true
set wshell=nothing
%>
vbs :
strComputer = "localhost"
strService = "W3SVC"
Set oService = GetObject("WinMgmts:{impersonationLevel=impersonate}!//" &
strComputer & "/root/cimv2:Win32_Service.Name='" & strService & "'")
oService.StopService
But i have this error :
Errore di run-time di Microsoft VBScript (0x800A0046)
Permission denied
/ordini/test.asp, line 3
thanks
I think that use a vbs file that execute from asp page :
asp page:
<%
set wshell = server.createobject("wscript.shell")
wshell.run "cscript d:\inetpub\wwwroot\stopservice.vbs",2,true
set wshell=nothing
%>
vbs :
strComputer = "localhost"
strService = "W3SVC"
Set oService = GetObject("WinMgmts:{impersonationLevel=impersonate}!//" &
strComputer & "/root/cimv2:Win32_Service.Name='" & strService & "'")
oService.StopService
But i have this error :
Errore di run-time di Microsoft VBScript (0x800A0046)
Permission denied
/ordini/test.asp, line 3
thanks