Jump to content
Sign in to follow this  
madmorgan

Windows 7 Updates reg location???

Recommended Posts

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

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...