Jump to content
Sign in to follow this  
madmorgan

Windows 7 Updates reg location???

Recommended Posts

madmorgan

Hello All,

can you tell me were the windows 7 updates information is keppt in the regsistory please i did use this line of code befor on windows XP but it dont work any more on Win 7.

RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\
Windows " & _"XP\SP3\KB921398"

any information will help thanks.

Share this post


Link to post
Share on other sites
madmorgan

ive look for that location in the reg but its not there. any othere ideas?

Share this post


Link to post
Share on other sites
stamandster

I've adapted the script from the below site which should help you out and get you started

http://msinfluentials.com/blogs/jesper/archive/2007/12/28/remotely-listing-all-installed-updates.aspx

$strCompName = @ComputerName
$strQuery = "winmgmts:" & "{impersonationLevel=impersonate}!\\" & $strCompName & "\root\cimv2"
$objWMIService = ObjGet($strQuery)
$colItems = $objWMIService.ExecQuery("Select * from win32_QuickFixEngineering")

$oFile = @scriptdir &"\"& $strCompName & ".html"

IF IsObj($colItems) Then

    FileDelete($oFile)
    Filewriteline($oFile,'<HTML><HEAD><TITLE>Installed Updates</TITLE></HEAD><BODY>')
    Filewriteline($oFile,'<h1>Found ' & $colItems.Count & ' updates on ' & $strCompName & '</h1>')
        Filewriteline($oFile,'<table border="1">')
            Filewriteline($oFile,'<tr style="background-color:#a0a0ff;font:10pt Calibri;font-weight:bold;" align="left"')
                Filewriteline($oFile,'<td>Caption</td>')
                Filewriteline($oFile,'<td>Description</td>')
                Filewriteline($oFile,'<td>Hotfix ID</td>')
                Filewriteline($oFile,'<td>Installed By</td>')
                Filewriteline($oFile,'<td>Installed On</td>')
                Filewriteline($oFile,'<td>Service Pack in Effect</td>')
                Filewriteline($oFile,'<td>Fix Comments</td>')
            Filewriteline($oFile,'</tr>')

    For $QFE in $colItems
        Filewriteline($oFile,'<tr style="background-color:#e0f0f0;font:10pt Calibri;"')
            Filewriteline($oFile,'<td>' & $QFE.Caption & '</td>')
            Filewriteline($oFile,'<td>' & $QFE.Description & '</td>')
            Filewriteline($oFile,'<td>' & $QFE.HotfixID & '</td>')
            Filewriteline($oFile,'<td>' & $QFE.InstalledBy & '</td>')
            Filewriteline($oFile,'<td>' & $QFE.InstalledOn & '</td>')
            Filewriteline($oFile,'<td>' & $QFE.ServicePackInEffect & '</td>')
            Filewriteline($oFile,'<td>' & $QFE.FixComments & '</td>')

        #cs
        msgbox(0,"FOUND","Caption: " & $QFE.Caption & @CRLF _
                        &"Description: " & $QFE.Description & @CRLF _
                        &"Hotfix ID: " & $QFE.HotfixID & @CRLF _
                        &"Installed By: " & $QFE.InstalledBy & @CRLF _
                        &"Installed On: " & $QFE.InstalledOn & @CRLF _
                        &"Service Pack: " & $QFE.ServicePackInEffect & @CRLF _
                        &"Fix Comments: " & $QFE.FixComments)
        #ce
    Next

    Filewriteline($oFile,'</tr>')
    Filewriteline($oFile,'</table></body></html>')

EndIf

if FileExists($oFile) Then ShellExecute($oFile)
Edited by kickarse

Share this post


Link to post
Share on other sites
wakillon

@kickarse

Nice script ! Posted Image

Tried on xp sp3 and works fine !

Thanks.


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.