I'm going to detect my os update status using wuapi.
Using IUpdateSearcher::Search i can do it, but this function can only be used at online.
At offline I also used IUpdateServiceManager::AddScanPackageService function to get status but this functions need wsusscn2.cab file and this file is too large.
At offline is there any other wuapi to detect windows update status or is there any registry or system file to detect it?
Thank you for you help...
Even offline, you can use a Windows Update API search to see what updates are needed. You can set your IUpdateSearcher object's Online property to false before calling Search or BeginSearch. Doing that will perform an offline scan, in which WU just re-evaluates the updates it already knows about. This will work offline and will also return faster results. There are two downsides you should be aware of:
- An offline scan obviously won't return information on any new or modified updates released since the last time the computer did an online scan.
- If the hardware or software configuration has changed since the last time the computer did an online scan, your offline scan may not return information on updates that became applicable because of the configuration change, even if those updates had already been published at the time of the last online scan. To give a simple example, if you install Office, your offline scans won't return Office updates until the next time you do an online scan. This is because the WU/MU/WSUS/SCCM services try to save time and bandwidth by only telling the clients about updates that might be applicable, rather than downloading the whole update catalog to every client. Since your computer hasn't had Office before, the services haven't told your computer about Office updates.