MSInfo32 - Ron Crumbaker's Web Remote Console 3.21
I thought someone else had blogged this... but now I can't find it. If someone else has this blogged, just remind me.
If you want to add an msinfo32 button, add this to your machrest.asp by your other buttons (near the top):
<INPUT id="Button728" style="WIDTH: 151px" type="button" value="MS Info" span class="tooltip" title="MSinfo32" name='Btnl728'>
and near the bottom, by your other sub/end sub routines, this:
Sub Btnl728_OnClick
on error resume next
Set WShell = CreateObject("WScript.Shell")
CompName = Trim(document.frmMain.txtValue.value)
Set objSWbemServices = GetObject("winmgmts:" &_
"{impersonationLevel=impersonate}!\\" &_
CompName & "\root\cimv2")
if err.number <> 0 then
msgbox "Unable to access WMI on " & CompName & vbcr &_
"Error: " & err.description,,"MSInfo32"
Else
WShell.Run "msinfo32.exe /Categories +SystemSummary /Computer " & CompName,1,False
End if
End Sub
(Credits to Don Hite: grabbed the syntax from his blog entry)