如何检索网络内计算机上已安装软件的列表? [英] How to retrieve list of installed softwares on computers within network?

查看:119
本文介绍了如何检索网络内计算机上已安装软件的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获取网络中计算机上安装的软件的列表.
为此,我正在使用以下代码...

Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, IPAddress);
         string SoftwareKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
         regKey = regKey.OpenSubKey(SoftwareKey);
string[] names = regKey.GetSubKeyNames();    
foreach (string entry in names) 
{
    Console.WriteLine(entry.ToString());
}
regKey.Close(); 



但这给了我错误...
未处理的异常:System.Security.SecurityException:不允许请求的注册表访问.

请帮助...

解决方案

检查是否在所有计算机上都运行了远程注册表服务,并且运行此代码的凭据可以访问所有这些计算机. /blockquote>

I want to get a list of softwares installed on computers within the network.
For this I am using following code...

Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, IPAddress);
         string SoftwareKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
         regKey = regKey.OpenSubKey(SoftwareKey);
string[] names = regKey.GetSubKeyNames();    
foreach (string entry in names) 
{
    Console.WriteLine(entry.ToString());
}
regKey.Close(); 



But it gives me error...
Unhandled Exception: System.Security.SecurityException: Requested registry access is not allowed.

Please help...

解决方案

Check if the remote registry service is running on all the computers and the credentials under which this code runs has access to all of them.


这篇关于如何检索网络内计算机上已安装软件的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆