Re: Windows update location
Well... I just realized that they're located in the registry. I guess that's something I've known for a little while, but didn't think about it.
I would really hate to determine it by that method, so if anyone knows if any other method, that would be appreciated.
If there isn't, I'll just have to suck it up and play with the registry :p
Re: Windows update location
It turns out, when updates are installed, they get logged in a text file called WindowsUpdate located in the C:\Windows directory.
I should be able to just query that file.
Re: Windows update location
It turns out that doing a query on that file works perfectly.
It seems that "voicing" the issue was all that I needed to figure it out :p
Re: [RESOLVED] Windows update location
Does that definitely have ALL installed windows updates in and on all versions of Windows? I'm sure there will be something in the registry that is a little more reliable. I got my code here getting most windows updates but on Windows 7 especially it seems to not get a lot of updates. Also, do you know how you are going to actually install the missing updates yet? If not, have a search on the forums for WUAPILIB :)
Re: [RESOLVED] Windows update location
Yeah. I don't want to have to use the registry since it can be slower and they're kind of all just scattered everywhere. But it looks like I'm going to have to.
The problem with the log file, I've found out, is that there doesn't seem to be a way to determine if the update has been installed. I'm currently checking it for the KB number, but it will be there regardless since it gets logged when it downloads.
I'm installing the updates via the WUSA.exe utility, which is easy and works perfectly.
Re: Windows update location
Ugh... this is becoming annoying. I wish this was straight forward =/
So, it looks like there are two places that I have found so far that MS stores the registry keys for updates.
Code:
HKLM\SofTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\ComponentDetect
HKLM\SofTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\ApplicabilityEvaluationCache
The first key looks like, if it's there, it's installed. The problem with this that a single update KB shows up several times within this key, so I'm not sure if this is reliable.
The second one is... confusing. Each update contains two DWORDs and I think their values determine if an update is pending or has been installed, but I don't think every update is their. If it was, that would make this sooooo easy. I could then just check the appropriate values and be done. But I don't think it will be that easy.
Re: Windows update location
Hm... it also looks like I could query WMI to determine if an update has been installed. That might be the easiest path, but definitely the slowest.
I guess the issue with WMI is that I can't seem to figure out which Class it's located within. I've seen some VBScripts that reference Microsoft.Update.Session, but that's not a WMI class. You can see it here.
Re: Windows update location
Which operating systems do the machines use?
Also, could please use the "Edit" button instead of posting on after the other of your posts. It can get very disorienting when seeing post after post by the same user all the time.
Re: Windows update location
I'm only focusing on Windows 7.
I chose not to edit so that those who are subscribed to the thread, would receive an update. I posted new things each time.
Re: Windows update location
Did you take a look at my "Enumerate Installed Programs" code? I think if you are going down the registry route then it might be a good place to start
Re: Windows update location
I've seen it before, but like you mentioned, most Windows 7 updates aren't there.\
I'll take another look when I get a chance.
Re: Windows update location
ah ok fair enough, I suppose I should really take a look at fixing it so that it does get all of the updates soon anyway