VBS Last Windows Update Check

Si può utilizzare il seguente script,
per individuare l’ultimo aggiornamento eseguito da windows update (attenzione che la data/ora non è comprensiva del fuso orario).

Const HKEY_LOCAL_COMPUTER = &H80000002

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Detect"
strEntryName = "LastSuccessTime"

Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") 
objReg.GetStringValue HKEY_LOCAL_COMPUTER, strKeyPath, strEntryName, strValue 

Wscript.Echo(strValue)

Per maggiori informazioni:

This entry was posted in Programming Languages, VBScript. Bookmark the permalink.