11

I have a fast question: IS there any other places in the registry but this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

where I can find the installed applications of a system? I am asking that because for example IExplorer is not in none of those registers. Where else have I to look?? I need ALL the places where a application that is installed can be.

Thanks for your help ;)

user1618465
  • 1,813
  • 2
  • 32
  • 58

4 Answers4

7

Your most reliable option is probably to use Windows Management Interface (WMI) to enumerate the software installed by Windows Installer.

See Here
Enumerating Installed Software
Win32_Product class

Note that this does not guarantee that Internet Explorer is going to show up there. I think you can safely assume that Internet Explorer is going to be present on every Windows computer currently out there; Microsoft views it as part of the operating system.

You can, however, find out which version of IE is installed.

Community
  • 1
  • 1
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
  • 1
    How to find it when it isn't listed by wmic? (wmic doesn't list everything) – jeromej Mar 08 '16 at 23:41
  • wmic does not list installed software exhaustively. It cannot be viewed as "the most reliable option". – seongjoo Mar 24 '16 at 05:28
  • Now in Windows10, WMI method is not as reliable as using uninstall and app_path subkeys. Most of the InstallLocation is not set, and a lot of apps are not listed. – laishiekai Jul 31 '20 at 17:00
1

The paths in the question don't include the apps installed on a user level.

They are in the same location, but under HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE.

So in total:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

But as you can tell, HKEY_CURRENT_USER only applies to the current user.

To access all the users there is the HKEY_USERS registry root, which has a folder for each user.

So instead, you need:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

for each user sid under HKEY_USERS:
  HKEY_USERS\<user sid>\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  HKEY_USERS\<user sid>\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

P.S. If you want to match between a user's SID and its name, you can look in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\<user sid> for the key named ProfileImagePath, which should equal C:\Users\<user name>. Not all users have this key, I think these are system users or something which you don't want to touch.

assembly_wizard
  • 2,034
  • 1
  • 17
  • 10
0

I was looking for this information, but after a while, I remembered that I had written a program for it. For everyone, or for me in the future.

class Program
{
    //using Microsoft.Win32;
    //using System.IO;
    static void Main(string[] args)
    {
        string uninstallKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
        RegistryKey regKey = Registry.LocalMachine.OpenSubKey(uninstallKey);
        string[] subKey = regKey.GetSubKeyNames().Select((c)=>
        {
            RegistryKey rk = regKey.OpenSubKey(c);
            string displayName = (string)rk.GetValue("DisplayName");
            if (string.IsNullOrEmpty(displayName)) return "";
            return displayName + string.Format(" => [{0}]", c);
        }).ToArray<string>();
        string filename = "ProgramList.txt";
        if (File.Exists(filename)) File.Delete(filename);
        StreamWriter sw = File.CreateText(filename);
        foreach (string appName in subKey.OrderBy(c=>c))
        {
            if (appName != "" && !appName.StartsWith("{"))
            {
                Console.WriteLine(appName);
                sw.WriteLine(appName);
            }
        }
        sw.Close();
    }
}
antonio
  • 548
  • 8
  • 16
0

#Reg.exe is in system32 but works if you copy to your script source path...# reg.exe query \servername\HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

Patrick Burwell
  • 129
  • 1
  • 12