Hi,
I have written a script which will install the patches using WUA API.
While trying to list out all the missing patches from any desktop/server, I m getting RebootRequired property as FALSE for all the patches, though the patch requires Reboot .
If I install the same patches and if I check for the over all RebootRequired status, it is returning TRUE , in fact it is correct.
Below is the sample script I tried to get the RebootRequired Status before installing the patches:
Set updateSession = CreateObject("Microsoft.Update.Session")
Set updateSearcher = updateSession.CreateupdateSearcher()
WScript.Echo "Searching.."
Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software'")
For i = 0 To searchResult.Updates.Count-1
Set update =searchResult.Updates.Item(i)
Wscript.Echo "Title: " & update.Title & " Reboot Required: " & update.RebootRequired
Next
This returns FALSE for all the patches
After installation, if I try to check the overall status of the RebootRequired flag, it is showing TRUE.
Here is the script:
Set install = updateSession.CreateUpdateInstaller()
install.Updates = updateToInstall
Set installed = install.Install()
installed.RebootRequired is returning TRUE . this is the overall status of the patch installation.
Please suggest.
Thank you,
Kalyan Polasi
Page 1 of 1
How to detect if a reboot is needed before installing a patch How to detect if a reboot is needed before installing a patch
#2
Posted 27 May 2010, 06:39
I am a noobie and this may not be what you are looking for... However, if you read the executive summaries for each patch month, for example http://www.microsoft...n/ms10-may.mspx
you will see a Restart Requirement column. This will tell you if the patches you are applying need a restart.
you will see a Restart Requirement column. This will tell you if the patches you are applying need a restart.
Page 1 of 1

Sign In
Register
Help
MultiQuote