Hi,
I was wondering if someone could help me. You can trigger a
resetauthorization by executing the following command "wuauclt.exe
/resetauthorization /detectnow" but how can I do that "through" the API? For
example, below is a code that I found that will check for updates ( köra
wuauclt.exe /detectnow) but how can I trigger the "resetauthorization" part?
Dim update, i
set AutoUpdate = CreateObject("Microsoft.Update.AutoUpdate")
Autoupdate.DetectNow()
set UpdateSession = CreateObject("Microsoft.Update.Session")
set UpdateSearcher = UpdateSession.CreateUpdateSearcher()
set SearchResult= UpdateSearcher.Search("")
set Updates = SearchResult.Updates
set UpdatesToInstall = CreateObject("Microsoft.Update.UpdateColl")
For i = 0 to (Updates.Count-1)
UpdatesToInstall.Add(Updates.Item(i))
Next
set Installer = UpdateSession.CreateUpdateInstaller()
Installer.Updates = UpdatesToInstall
set InstallationResult = Installer.Install()
Thanks!
Björn Axéll
|