B
barabba72
Hi All,
I have the following code:
Basically when I enter the server name and hit the "submit" button, IE
says "the page cannot be displayed.There is a problem with the page you
are trying to reach and it cannot be displayed.".
Further, how can I debug my code, is there a debugger I should use ?
<html>
<body>
<form action="homepage.asp" method="get">
Server to Manage: <input type="text" name="strComputer" size="20" />
<input type="submit" value="Submit" />
</form>
<%
dim strComputer
mServer=Request.QueryString("strComputer")
If mServer<>"" Then
strComputer = mServer
response.write mServer
Set objNetwork = Server.CreateObject("Wscript.Network")
Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & mServer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery ("SELECT * FROM
Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
response.write objOperatingSystem.Caption',
objOperatingSystem.Version
Next
End If
%>
</body>
</html>
I have the following code:
Basically when I enter the server name and hit the "submit" button, IE
says "the page cannot be displayed.There is a problem with the page you
are trying to reach and it cannot be displayed.".
Further, how can I debug my code, is there a debugger I should use ?
<html>
<body>
<form action="homepage.asp" method="get">
Server to Manage: <input type="text" name="strComputer" size="20" />
<input type="submit" value="Submit" />
</form>
<%
dim strComputer
mServer=Request.QueryString("strComputer")
If mServer<>"" Then
strComputer = mServer
response.write mServer
Set objNetwork = Server.CreateObject("Wscript.Network")
Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & mServer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery ("SELECT * FROM
Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
response.write objOperatingSystem.Caption',
objOperatingSystem.Version
Next
End If
%>
</body>
</html>