How to shut down Computer using ASP 3.0
Hello All,
Can Any body tell me how to shut down the clint computer from my website through an ASP V 3.0.
I am using the following function code:
================================================== =====
<%
Sub ShutDown()
Dim Connection, WQL, SystemClass, System
'Get connection To local wmi
Set Connection = GetObject("winmgmts:root\cimv2")
'Get Win32_OperatingSystem objects - only one object In the collection
WQL = "Select Name From Win32_OperatingSystem"
Set SystemClass = Connection.ExecQuery(WQL)
'Get one system object
'I think there is no way To get the object using URL?
For Each System In SystemClass
System.Win32ShutDown (2)
Next
End Sub
call ShutDown()
%>
=================================================
Please help me i have tried to do this but it throw an Error as:
Error Type:
(0x80041003)
/shut.asp, line 6
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Media Center PC 3.0; .NET CLR 1.0.3705; .NET CLR 2.0.50727
Shahhussain
__________________
Shahhussain
|