using System;
using System.Collections.Generic;
using System.Text;
using Jxmstc.common.Network;
using System.Collections;
using Microsoft.Win32;
using System.Windows.Forms;
using System.IO;
using System.Web;
using System.Data;
using Jxmstc.scvmm.Utils;
using System.Management;
namespace Jxmstc.vm.operation
{
/*
*获取虚拟机中安装软件信息
*/
class InstallSoftData : BaseOpertaion
{
private string sReturnMessage = string.Empty;
HttpProcessor p;
string addressWidth = String.Empty;
private new static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public override void Excute(Hashtable htParameters, HttpProcessor _p)
{
//保存返回的Json格式安装的软件信息
p = _p;
string bit32 = string.Empty;
string bit64 = string.Empty;
RegistryKey localMachine;
RegistryKey Uninstall;
string sInstallSoftsData = "";
//将客户机中安装的软件信息保存在DataTable中
DataTable dt = new DataTable();
dt.Columns.Add("SoftName");
dt.Columns.Add("SoftVersion");
dt.Columns.Add("SoftPublisher");
C#获取32位或者64位系统安装软件信息
最新推荐文章于 2024-08-26 17:25:44 发布
这个C#代码示例展示了如何获取虚拟机中安装的32位或64位软件信息。通过遍历注册表键`SOFTWAREMicrosoftWindowsCurrentVersionUninstall`和`SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall`,收集软件名称、版本和发布者,并将数据存储在DataTable中。同时,它包含了一个方法`Distinguish64or32System`来判断系统位数。
摘要由CSDN通过智能技术生成