2012-07-10 19:45:02 +0000 2012-07-10 19:45:02 +0000
31
31
Advertisement

列出所有安装在电脑上的软件

Advertisement

有没有什么Windows内置的软件可以让我以一种可以复制/粘贴到电子表格的方式列出计算机上所有安装的软件?我知道有一些软件可以做到这一点,但我不能安装任何东西。如果可能的话,我希望不要使用批处理文件,但我想这将是唯一的方法。理想的情况是,我能够输出与 “添加/删除程序 "表格的(未展开)视图中显示的相同信息。

Advertisement
Advertisement

答案 (8)

41
41
41
2012-07-10 19:58:16 +0000

启动你的控制台,然后键入:

wmic product get name,version

wmic /output:C:\InstallList.txt product get name,version

这需要一段时间,但你会得到完整的安装程序列表。WMIC是Windows Management Instrumentation的控制台版本,从Windows 2000及以后的版本开始使用。按照这里这里的说明,你可以告诉WMIC以XML格式输出,这对你来说可能更方便一些。然而,只需调用wmic product get name就可以得到一个应用程序名称列表,您可以轻松地复制粘贴到文本编辑器中并转换为电子表格格式。

或者,输入。

wmic /output:C:\InstallList.csv product get /format:csv.xsl

这将输出一个包含程序列表的TXT文件。如果您愿意,您可以将其粘贴到电子表格中。

来源。 http://helpdeskgeek.com/how-to/generate-a-list-of-installed-programs-in-windows/


你也可以使用csv.xsl文件将输出结果格式化为CSV列表。

wmic /output:C:\InstallList.htm product get /format:hform.xsl

或者使用htable.xsl文件来创建一个HTML结果表。

0x1&

8
8
8
2012-07-10 19:54:54 +0000

运行wmic product get得到安装软件的列表,它应该和添加/删除程序的列表一模一样。

你应该可以让它以特定的格式输出,但我还没试过。

(使用wmic product get /?查看包括输出格式在内的参数,我试着把它包含在这里,但格式不太正确。)

5
Advertisement
5
5
2012-07-10 20:13:18 +0000
Advertisement

正如其他人所提到的,你可以通过WMI查询Win32_Product对象来获得这些信息。如果你愿意的话,PowerShell甚至会把它转储到一个CSV文件中。

Get-WmiObject -Class "Win32_Product" | Export-CSV (Join-Path $home "Win32_Product.csv")

然而,你应该【搜索Win32/Product问题】(https://www.google.com/#hl=en&q=win32_product+issues)。并非所有的都是口香糖和棒棒糖。

4
4
4
2014-10-09 19:14:03 +0000

WMIC无法在服务器上工作,除非你已经明确Management and Monitoring Tools菜单中安装Add/Remove Windows Components

另一个解决方案是进入注册表,查看所有的不可卸载程序

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

你必须分别点击每一个才能看到值,所以,你可以右键点击Uninstall文件夹,然后选择导出。确保Export Range设置为只包括Selected Branch

^(?!"DisplayName").+

然后你可以用记事本++打开.reg文件,但是你会得到很多关于每个应用程序的额外信息。

你可以通过与下面的regex匹配来删除所有不以 "DisplayName"开头的行。

("DisplayName"="|")

然后你可以通过匹配下面的regex "DisplayName"来删除任一字符串 "或0x6&。

^(.*)(\r?\n)+$

然后,你可以通过在以下regex上匹配来删除任何重复的行

或者你可以 按字母顺序排序 然后删除空白的行。

3
Advertisement
3
3
2013-07-11 10:53:37 +0000
Advertisement

我发现最简单的方法是运行 piriform 的 ccleaner。
这个有一个按钮,在工具->卸载->“保存到文本文件"。

0
0
0
2017-03-05 15:59:46 +0000

前面没有提到的另外两个非命令行的解决方案是。

1.MyUninstaller – – NirSoft公司的一个免费程序,除了卸载之外,还可以将所有已安装软件的综合清单导出为HTML,其中包括许多附加信息。它的优点是便携。虽然它不是 “内置 "的,但你可以从USB驱动器运行它。你可以找到它 这里 .

  1. Belarc Advisor - 一个免费软件(个人使用)程序,它可以对您的计算机的硬件和软件进行安全分析和全面盘点。它是可用的 这里 。不幸的是,你必须安装它,所以它不能完全满足上位机的需求,但可能会满足其他有同样问题并能安装的人的需求。
0
Advertisement
0
0
2017-07-12 14:57:08 +0000
Advertisement

在c#中通过注册表

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 && subkey.GetValue("DisplayName").ToString().Contains("Visual Studio"))
                            {
                                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();
        }

    }
}
```安装程序的编码版本。
0
0
0
2016-08-14 20:52:43 +0000

在Windows 7上,你可以使用PowerShell脚本。

点击Start按钮打开PowerShell,然后在搜索栏中输入powershell

然后在PowerShell窗口中输入以下命令。

Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize

你可以删除任何字段。DisplayName、DisplayVersion等字段,如果你不需要它们的话。

如果你想把输出保存到文件,请使用重定向。

Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize > C:\temp\AllInstalledPrograms.txt
Advertisement

相关问题

3
19
10
28
7
Advertisement