34

I once saw a guy run a command and got a list of all installed applications on his computer. How do I do this?

I would like a list of my currently installed applications. I believe he used WSH somehow.

migrated from stackoverflow.com Nov 10 '09 at 19:10

This question came from our site for professional and enthusiast programmers.

39

If you use Windows Vista or Windows 7 and you didn't want install additional software, you can:

  1. Open a command-line window (Windows + R, CMD.EXE)
  2. Type wmic (Enter)
  3. Type product get name (Enter)
  • +1 There's not much about your machine that WMI can't tell you these days. – GAThrawn Nov 10 '09 at 20:15
  • 5
    here it says that Win32_Product will not give all the information about the installed softwares. That means, it will not list all the softwares. The reason for this is, win32_product queries the MSI database to get the list. But there will be many softwares which will not have a entry in it as they got installed from exe's. In this case querying the uninstall registry key gives information about these softwares. – Miserable Variable Jun 25 '12 at 18:40
  • 1
    @MiserableVariable Does it say that? (Is it the wrong link?) How would one query the uninstall registry in similar fashion? (or perhaps by using wmic itself?) – JeromeJ Mar 8 '16 at 22:59
  • 1
    Also works with Windows 10 – Turcia Aug 3 '16 at 7:33
  • 5
    Is it just me, or this runs very slow? – user3083324 Nov 20 '16 at 0:56
27

PsInfo from Microsoft/Sysinternals can list all the installed software if you use the -s flag when you run it. You can also use -c to output it as a csv file to use in Excel for example.

C:\> psinfo -s > software.txt
C:\> psinfo -s -c > software.csv
  • 1
    also works unter Win XP in contrast to WMI solution – Gerd Klima Nov 10 '09 at 20:56
  • Does not show all installed software on Windows 2012 R2 x64. I'm using PsInfo ver. 1.77 – Tomasito May 11 '16 at 19:33
  • This method produced 933 items on my laptop and the WMI method produced only 598. It seemed to produce a larger list... – Andrej Adamenko Feb 9 '17 at 13:00
  • @djhowell: I am trying to execute the command in Windows 7 but I get an error, " psinfo is not recognized as an internal or external command, operable program or batch file. ". And this happens even in elevated rights cmd window. – skm Apr 18 '18 at 11:50
14

A PowerShell script to list them:

$loc = Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall

$names = $loc |foreach-object {Get-ItemProperty $_.PsPath}

foreach ($name in $names)
{
    Write-Host $name.Displayname
}

Not exactly command line, but for this purpose I personally use CCleaner's uninstall tool, and you can export the list of installed software to a text file:

Alt text

  • 2
    Rather ironic that the Windows Powershell etc tools take ages to run (>5 mins) but CCleaner is instant. – CAD bloke Aug 3 '15 at 10:12
6

Not exactly command line either, but trusty old SIW will do the job as well. Highlight Applications, right click → Export ToCSV, HTML, TXT or XML:

Alt text

SIW is freeware and portable, and installation isn't required.

  • I have always know SIW to require a license, where are you getting it as Freeware? – El Turner Jun 10 '16 at 18:51
3

The CCleaner solution above seems like a decent way to go about it, unless you're determined to use the command-line. I've used CCleaner before, it's a good tool But don't assume that everything is registered in the Add/Remove Programs applet (the same list). There are plenty of apps that use xcopy-style installation, i.e. simply unzip this archive and run. Those will not show up in the list.

3

To add to MicTech's solution - use wmic and capture the list of installed software to a file:

Open a command-line window (Windows + R, CMD.EXE)

wmic /OUTPUT:my_software.txt product get name
2

Sysinternals psinfo.exe provides the most complete information of all the suggestions given, and it can be run on any Windows PC from the command line directly from an elevated CMD prompt, without permanent downloading:

\\live.sysinternals.com\tools\psinfo.exe -s > %userprofile%\Desktop\_psinfo.txt

You will get a security prompt when you run this, and a EULA prompt the first time on a machine. A text file will be saved to the current desktop.

The EULA can be automatically accepted like this:

\\live.sysinternals.com\tools\psinfo.exe -s /accepteula > %userprofile%\Desktop\_psinfo.txt
0

There is a portable application called Showmysoft. It will show the installed software on the local machine and remote machines and can export to PDF and to CSV. Installation is not required. Download from http://spidersoft.in/showmysoft/.

The minimum system requirement is Microsoft .NET Framework 2.0.

0

The encoded version in C# installed programs via Windows registry:

using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;


namespace SoftwareInventory
{
    class Program
    {
        static void Main(string[] args)
        {
            //!!!!! Must be launched with a domain administrator user!!!!!
            Console.ForegroundColor = ConsoleColor.Green;
            StringBuilder sbOutFile = new StringBuilder();
            Console.WriteLine("DisplayName;IdentifyingNumber");
            sbOutFile.AppendLine("Machine;DisplayName;Version");

            // Retrieve machine name from the file :File_In/collectionMachines.txt
            //string[] lines = new string[] { "NameMachine" };
            string[] lines = File.ReadAllLines(@"File_In/collectionMachines.txt");
            foreach (var machine in lines)
            {
                // Retrieve the list of installed programs for each extrapolated machine name
                var registry_key = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
                using (Microsoft.Win32.RegistryKey key = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, machine).OpenSubKey(registry_key))
                {
                    foreach (string subkey_name in key.GetSubKeyNames())
                    {
                        using (RegistryKey subkey = key.OpenSubKey(subkey_name))
                        {
                            //Console.WriteLine(subkey.GetValue("DisplayName"));
                            //Console.WriteLine(subkey.GetValue("IdentifyingNumber"));
                            if (subkey.GetValue("DisplayName") != null)
                            {
                                Console.WriteLine(string.Format("{0};{1};{2}", machine, subkey.GetValue("DisplayName"), subkey.GetValue("Version")));
                                sbOutFile.AppendLine(string.Format("{0};{1};{2}", machine, subkey.GetValue("DisplayName"), subkey.GetValue("Version")));
                            }
                        }
                    }
                }
            }
            // CSV file creation
            var fileOutName = string.Format(@"File_Out\{0}_{1}.csv", "Software_Inventory", DateTime.Now.ToString("yyyy_MM_dd_HH_mmssfff"));
            using (var file = new System.IO.StreamWriter(fileOutName))
            {
                file.WriteLine(sbOutFile.ToString());
            }

            // Press Enter to continue 
            Console.WriteLine("Press enter to continue!");
            Console.ReadLine();
        }
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy