Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7010897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:03:30+00:00 2026-05-27T22:03:30+00:00

Does anyone know, how given a GUID that identifies an installed product, you can

  • 0

Does anyone know, how given a GUID that identifies an installed product, you can find the patches installed for that product with C#?

The application is quite complex and from time to time, we create patches (MSP files) through Orca/MSI. These patches can then be installed on the customer’s computer and can then be viewed in “View Installed Updates” under Programs and Features.

I’ve tried two approaches:

  1. Using WMI I can find my product in Win32_Product and retrieve the
    information there. However, if I then query either
    Win32_PatchPackage or Win32_Patch for matches against the
    “ProductCode”. I would have expected the captions/description to
    contain the information I want, but all I get is another separate
    set of GUIDs for each which doesn’t seem very obvious what to do
    with it.

  2. Similarly, using the Registry I can find the Product (under
    HKLM\Software\Microsoft\Uninstall\\, and with some digging I
    can find Patches (under
    HKLM\Software\Microsoft\Installer\UserData\S-1-5-18\Products\)
    but the key isn’t obvious. It isn’t the same as my products
    installer GUID.

This question discusses similar issues, but the questioner was looking for the Windows patches, while I need my own applicaitons patches – so there solution doesn’t really work for me.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:03:31+00:00Added an answer on May 27, 2026 at 10:03 pm

    I was able to achieve this by plugging the ProductCode returned from Win32_PatchPackage into a Win32 dll and then using as so.

        [DllImport("msi.dll", CharSet = CharSet.Unicode)]
        internal static extern Int32 MsiGetPatchInfoEx(string szPatchCode, string szProductCode, string szUserSid, int dwContext, string szProperty, [Out] StringBuilder lpValue, ref Int32 pcchValue);
    
        // See http://msdn.microsoft.com/en-us/library/windows/desktop/aa370128%28v=vs.85%29.aspx 
        // for valid values for the property paramater
        private static string getPatchInfoProperty(string patchCode, string productCode, string property)
        {
            StringBuilder output = new StringBuilder(512);
            int len = 512;
            MsiGetPatchInfoEx(patchCode, productCode, null, 4, property, output, ref len);
            return output.ToString();
        }
    
        public static string GetPatchDisplayName(string patchCode, string productCode)
        {
            return getPatchInfoProperty(patchCode, productCode, "DisplayName");
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of a free online tool that can crawl any given website
Does anyone know of a function that can create an lm object given a
Does anyone know of any resources that can give me an idea of how
Does anyone know of any existing solutions using javascript that can parse a crontab
Does anyone know how (if possible) I can find out how much capacity (mAh)
Does anyone know why Python's list.append method is not called list.push , given that
Does anyone know of a library (preferably java) that can give me neighboring keys
Does anyone know a way in c# to find given a very large string
Does anyone know of, or can recommend, a library that can recursively visualize an
Does anyone know any simple way to retrieve the country from a given IP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.