none
finding all installed softwares from the registry. RRS feed

  • Question

  • Hi,

    i am following all the below steps to get the  installed softwares list.

    1. Loop through all subkeys in HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall
     
    2. For each subkey, do the following:
    --Check to see if the SystemComponent value exists and is set to 1 - if it is then move on to the next subkey
    --Check to see if the WindowsInstaller value exists and is set to 1 - if it is then move on to next subkey
    --Check to see if the UninstallString value exists - if it does not then move on to next subkey
    --Check the ReleaseType value, if it is hotix or service pack etc then move on to next subkey
    --Check the ParentKeyName value, if it exists then move on to next subkey
    --Check to see if the DisplayName value exists - if it does then add this name to our list of installed programs
     
    3. Repeat this same process for all subkeys in HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall if it exists.
     
    4. Loop through all users in HKEY_USERS and for each one, loop through the subkeys in HKU\USER-SID-HERE\Software\Microsoft\Windows\CurrentVersion\Uninstall and do the exact same thing described in step 2
     
    5. Whilst looping through all users in HKEY_USERS, also check HKU\USER-SID-HERE\Software\Microsoft\Installer\Products and for each subkey in there do the following:
    --Check to see if a subkey with the same GUID name exists in HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\USER-SID-HERE\Products - if it does then check to see if the SystemComponent value in the InstallProperties subkey is set to 1 - if it is then move on to the next subkey
    --Read the ProductName value and add it to our list of installed programs
     
    6. Loop through all subkeys in HKLM\Software\Classes\Installer\Products and for each one do the following:
    --Check to see if a subkey with the same GUID name exists in HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products - if it doesnt then move on to the next subkey
    --Check the SystemComponent value is not set to 1 - if it is set to 1 then move on to next subkey
    --Check the WindowsInstaller value exists and is set to 1 - if it is not then move to next subkey

    --Read the ProductName value and add it to our list of installed programs

    this works perfectly fine in window application. but in window service HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall registery giving me different no of softwares. i am not able to understand that if its working perfectly fine in window application then why not in window service.

    Please help me out to solve this problem.

    Friday, April 20, 2012 11:04 AM

Answers

  • Sonal,

    This is an online forum provided by Microsoft about their product "Microsoft Project".  You'll have better luck with your question if you re-post in a more appropriate forum. See http://www.microsoft.com/communities/forums/default.mspx or search via Google and/or Bing.


    --rms www.rmschneider.com

    Friday, April 20, 2012 11:43 AM