How do I know if there are pending security updates from cmd or python?

I need to know if Windows is expecting pending security updates from cmd or python.

I found a form for this from cmd:

-First: I do >> C:\Windows\system32\wuauclt.exe /detectnow

-After that: >> Read the %systemroot%\WindowsUpdate.log

file information.

But I believe this is another simple form.

I found there is a library named WUApiLib for C # , does this exist for python or something in style?

+3
python windows


source to share


2 answers


You can use Powershell for this kind of thing:

  • https://gallery.technet.microsoft.com/scriptcenter/0dbfc125-b855-4058-87ec-930268f03285
  • https://serverfault.com/questions/135191/shorcut-to-list-pending-updates-in-microsoft-windows


I cannot find a direct way to access WSUS information. You could get them using PyWin32 or ctypes, but I couldn't find any examples.

0


source to share


You can use the Wuinstall command line tool ( http://www.wuinstall.com ) like this: wuinstall / search lists all pending updates, with the / xmlout parameter you can save the whole list in xml for further processing



0


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics