Results 1 to 13 of 13

Thread: Windows update location

  1. #1

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Windows update location

    In my current application, I need to install some already downloaded Windows updates on a variety of different machines. Some machines already have these updates, some have a few, and others and have none at all.

    I need to figure out how to determine which updates are installed.

    Anyone have any ideas?

    I searched for something like this some time ago, but came up with nothing.

    I'm going to do some more looking, but if anyone has any ideas, I'd appreciate it.

    Thanks
    Last edited by weirddemon; May 31st, 2010 at 11:18 AM.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  2. #2

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    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
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  3. #3

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    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.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  4. #4

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    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
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  5. #5
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  6. #6

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    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.
    Last edited by weirddemon; May 31st, 2010 at 11:17 AM.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  7. #7

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    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.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  8. #8

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    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.
    Last edited by weirddemon; May 31st, 2010 at 01:31 PM.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  9. #9
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    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.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  10. #10

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    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.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  11. #11
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  12. #12

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    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.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  13. #13
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width