View Single Post
  #1 (permalink)  
Old 01-02-2008, 08:19 AM
Pradeep Bisht
 
Posts: n/a
Reuslt of WMI script.
Hello,

I have a script with me, and I want the result of that script in a excel
file.So what is the command for that.
Thanks in advance.

Script -

strComputer = "."
Set objFso = CreateObject("Scripting.FileSystemObject")
strFile = "c:\Scripts\12.xls"
Set objSWbemServices = GetObject("winmgmts:\\" & strComputer)
Set colSWbemObjectSet = objSWbemServices.InstancesOf("Win32_Service")

For Each objSWbemObject In colSWbemObjectSet
Wscript.Echo "Display Name: " & objSWbemObject.DisplayName & vbCrLf & _
" State: " & objSWbemObject.State & vbCrLf & _
" Start Mode: " & objSWbemObject.StartMode
Next


Reply With Quote
Sponsored Links