Hi, I normally use below Powershell script to pull the Windows Update status.
get-service wuauserv | select Displayname,Status,ServiceName,Can*
Open in new window
Now what i would like to do is to run that script via my VB6 application.
So by clicking on a button, it give me the result in a msgbox.
I'm able to do it for the "ipconfig" but not able for "
wuauserv"
This is what i have so far:
Private Sub Command1_Click()
'get-service wuauserv | select Displayname,Status,ServiceName,Can*
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("ipconfig")
Do While oExec.Status = 0
'WScript.Sleep 100
Loop
MsgBox oExec.StdOut.ReadAll
End Sub
Open in new window
Thanks for your help