Windows Server 2008 R2 Thread, Knowing when update from WSUS is complete in Technical; Any tips or suggestions on how to determine if a Windows update from WSUS has been completed via a VB ...
1st June 2012, 08:08 PM #1
- Rep Power
Knowing when update from WSUS is complete
Any tips or suggestions on how to determine if a Windows update from WSUS has been completed via a VB script or something of the sort?
I am running Windows 7 on the clients and 2008r2 for the WSUS. All of the clients have been frozen with Faronics Deep Freeze and I want to automate the process of updating, so I need to thaw the machine, make the updates, then freeze them (the clients) once the updates are finished. Right now I am using a VB script to automate the freezing and thawing and whatnot.
Alternatively, if the WSUS could initiate a batch file or something once the upgrade is complete, that would work well.
Any tips would be greatly appreciated!
1st June 2012, 08:25 PM #2
you could run wuauclt /detectnow on the pcs as a script should force them to check for updates
1st June 2012, 08:39 PM #3
- Rep Power
Thanks! Yeah. I am already doing that to initiate the updates. I want to know when the updates on the client machine are completed so I can then call a script to freeze the machine...
It seems there is an WSUS API available which I am taking a look at to see if there is something I can take advantage of.
2nd June 2012, 12:31 PM #4
If you open up WSUS, all clients will report to the console. If it reads 100% then updating is complete.
4th June 2012, 08:03 PM #5
- Rep Power
Thanks for the tip. I understand that. I want an application to be able to know when WSUS is complete so it can perform certain functions afterwards in an automated fashion without any user interaction. I think WSUS has an API but I may just be able to read from the log. I haven't done this before so I'm not sure if there is a "right" way to do this.
Originally Posted by Michael
5th June 2012, 04:21 AM #6
I use a WSUS script from Rob Dunn that checks for installs then emails a report of updates installed. I am sure somewhere in that code are the functions you need.
I think I found it in the spiceworks script center.
Hope this gets you in the right direction.
6th June 2012, 11:34 AM #7
This may be of some use:
Powershell 2.0 - get-hotfix cmdlet problem
Basically, you can use powershell to detect Windows Componant updates (get-hotfix) or vb to qurey the underlying WMI object.
For other updates you can query the installer registry keys. To quote Mervyn Zhang from the thread linked above (in case the link breaks at some point in the future):
As a workaround, I suggest you try to query Registry. Windows Installer applications are listed in the following registry key:
For each product, there is a GUID corresponding registry key. To detect Office updates, you may consider querying the registry keys and retrieve the matching ones. A sample update:
That said, I'd be tempted to install MSBA 2.2 and call that from the command line to confirm weather all authorised updates have installed on the local machine.
6th June 2012, 08:02 PM #8
- Rep Power
Thanks so much psydii. Very helpful and seems this helps me get on the right track. If I have any issues I'll reply back. I'll try and remember to post my solution.
By mcowley in forum Windows Server 2000/2003
Last Post: 2nd March 2010, 12:39 PM
By Oops_my_bad in forum Windows
Last Post: 16th October 2007, 11:08 PM
By OverWorked in forum Windows
Last Post: 9th January 2007, 09:39 PM
By sidewinder in forum Mac
Last Post: 7th November 2006, 08:55 PM
By sidewinder in forum Windows
Last Post: 19th October 2006, 11:20 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)