Get a remote computers windowsupdate.log file


For those times when you don’t have easy access to computer and need to view its windowsupdate.log to find out why updates are’nt being applied then the below script can come in handy.

'This script will get a remote computers windowsupdate.log file
'it also changes the association for .log files to open with notepad
'Get and open WindowsUpdate log file on remote Computer
on error resume next
Set WshShell = Wscript.CreateObject("Wscript.Shell")
strcomputer = inputbox("Enter remote computer name or leave as localhost for this computer","Get WindowsUpdate.log file","Localhost")
If strComputer = "" Then
WScript.Quit
End If
'Associate .log Files with Notepad
wshShell.run "%comspec% /c c: & assoc .log=txtfile"
WScript.Sleep 500 'give association time to take effect
'open WindowsUpdate.log file on remote computer
wshShell.Run "\\" & strcomputer & "\c$\Windows\WindowsUpdate.log"
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: