Jump to content

Where is the Registry Key Verification in Win7?


didadocom

Recommended Posts

Where are located the registry settings of new updates in Windows Vista and Windows 7?

In Windows XP when you install a hotfix, a patch, an update like the last one from March 30, 2010 titled: "Cumulative Security Update for Internet Explorer for Windows XP (KB980182)", after the installation be it manually or automatic, the registry has a new entry indicating that the update was successfully applied, in this case:

Registry Key Verification

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP4\KB980182\Filelist"

But in Windows 7 the Deployment Information of a KB in Registry Key Verification only said:

"Note: A registry key does not exist to validate the presence of this update."

For information about the update: http://www.microsoft...n/MS10-018.mspx

Where Windows 7 (and Vista) gets the data to know which are the updates installed? :unsure: and there is a external tool to check/print them?

Link to comment
Share on other sites


Yes I used the tool but:

"...MBSA will only scan for missing security updates, update rollups and service packs available from Microsoft Update. MBSA will not scan or report missing non-security updates..."

I need to view all the updates.

Link to comment
Share on other sites

Where Windows 7 (and Vista) gets the data to know which are the updates installed? :unsure: and there is a external tool to check/print them?

use a WMI query to check which updates are installed.

It's OK but how can I print a list with each attribute?

Link to comment
Share on other sites

Here try this VBS Script and see if it will do what you want.


'-> Objects For Windows Update
Dim Upd :Set Upd = CreateObject("Microsoft.Update.Session")
Dim Str :Set Str = Upd.CreateUpdateSearcher
Dim Obj :Set Obj = Str.Search("Type='Software'")
Dim Col :Set Col = Obj.Updates
'-> Varibles
Dim Arw, Cfm, Drv, Mis, Sts, Tx1, Tx2
Arw = Chr(160) & Chr(187) & Chr(160)
'-> Loop To Separate Missing And Confirm Installed Updates
For i = 0 to Col.Count - 1
Sts = Col.Item(i).IsInstalled
Tx1 = "Update Full Name" & Arw & Col.Item(i).Title
If Sts <> 0 Then
Cfm = Cfm & Tx1 & vbCrLf
Else
Mis = Mis & Tx1 & vbCrLf
End If
Next
'-> Driver From Microsoft
Set Obj = Str.Search("Type='Driver'")
Set Col = Obj.Updates
For i = 0 to Col.Count - 1
Tx1 = "Driver Full Name" & Arw & Col.Item(i).Title
Tx2 = "Driver Installed" & Arw & Col.Item(i).IsInstalled
Drv = Drv & Tx1 & vbCrLf & Tx2 & vbCrLf
Next
'-> Objects
Dim Act :Set Act = CreateObject("Wscript.Shell")
Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject")
'-> Create Text File To Report Update Status
Tx1 = Act.SpecialFolders("Desktop") & "\WindowUpdateList.txt"
Set Tx2 = Fso.CreateTextFile(Tx1)
Tx2.WriteLine _
vbTab & "Install Updates" & vbCrLf & Cfm & vbCrLf & _
vbTab & "Drivers From MS" & vbCrLf & Drv & vbCrLf & _
vbTab & "Missing Updates" & vbCrLf & Mis
Tx2.Close
'-> Open The Text File
Act.Run("Notepad " & Chr(34) & Tx1 & Chr(34)),1,True
'-> Keep Or Delete The Text file
If MsgBox("Would You Like To Keep This File?",4132,"Keep Or Delete") = 7 Then Fso.DeleteFile(Tx1)

I have included the VBS file, you will have to change it name from ListAllUpdates.vbs.txt to ListAllUpdates.vbs

Link to comment
Share on other sites

Here try this VBS Script and see if it will do what you want.

I have tried and it brings back a text list of installed and missing updates. It is OK. many thanks, but it is partial.

use a WMI query to check which updates are installed.

After the suggestion of MagicAndre1981 to use the Microsoft WMI included in Windows, I tried but I am no expert in command lines, so I discovered the WMI Explorer v1.06 from KS-Soft and dowloaded it from http://www.ks-soft.net/hostmon.eng/wmi/index.htm

It has a simple graphic interface and after a Query of: Win32_QuickFixEngineering it brings back a complete list that one can save as html.

Also after much search I found the following command line to type in cmd.exe: wmic qfe list full /format:htable >C:\updates.htm, and the result is a list similar to the previous.

There is a complete documentation tool to use in a network (but it can also be used for a single machine) in: http://sydiproject.com/

OK now I have half problem solved: the list of all the updates installed in the machine.

Now someone knows where Windows 7 (and Vista) writes the data of the installed updates? and is there a way to see and change it?

Link to comment
Share on other sites

As you said:

"Note: A registry key does not exist to validate the presence of this update."

Windows Vista and Win7 use CBS to install updates, hence information about updates are stored in the CBS database (you could read the CBS log if you want to try), or you could use WindowsUpdate.log in the %windir% to try and piecemeal it out. However, it's not just a simple list anymore, so using Powershell and COM objects are probably the easiest way to coax out update lists. There's a very basic set of commands here, but if you want something cleaner that should be pretty easy to do as well.

Also note that Microsoft also created WMI Code Creator, which might be a bit easier to use than that tool once you know what you're doing at least with the WMI classes.

Link to comment
Share on other sites

Now someone knows where Windows 7 (and Vista) writes the data of the installed updates? and is there a way to see and change it?

I haven't looked for it more than 5 minutes (I just don't care that much), but I know your current method (using wmic) and other methods relying on WMI won't work. I would normally use the Get-Hotfix command (powershell), but as it says in its documentation:

This cmdlet uses the Win32_QuickFixEngineering WMI class, which represents small system-wide updates of the operating system. Starting with Windows Vista, this class returns only the updates supplied by Component Based Servicing (CBS). It does not include updates that are supplied by Microsoft Windows Installer (MSI) or the Windows update site. For more information, see the Win32_QuickFixEngineering class topic in the Microsoft .NET Framework SDK at http://go.microsoft.com/fwlink/?LinkID=145071.

So if you want a complete list, you'll just have to find another way. Apparently reading subkeys inside HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall doesn't work either.

Link to comment
Share on other sites

cluberti and gunsmokingman, just curious if these two methods will work for other versions of Windows besides Win7? I think they should?

Cheers and Regards

Yes, the powershell script should also work on XP/2003 with powershell 1.0 installed.

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...