关于winform打包部署程序的问题
--------------------编程问答-------------------- 自己顶自己 --------------------编程问答-------------------- 顶顶更健康 --------------------编程问答-------------------- 大家顶才是真的顶 --------------------编程问答-------------------- 刚刚写了篇博客来回答你这个问题:C# Tips: 通过WMI查询当前操作系统是64位的还是32位的
http://blog.csdn.net/xinyaping/article/details/7435840
--------------------编程问答-------------------- 您好,我还想追问下,我昨天是找到了用批处理的方式判断,现在的问题点在于 我怎么让安装部署程序在客户端安装完成后执行这一段代码呢? --------------------编程问答-------------------- 自定义操作:http://msdn.microsoft.com/zh-cn/library/3hwzzhyd.aspx
/// <summary>
/// Gets OS address width.
/// </summary>
/// <returns>32 indicates 32-bit OS, and 64 indicates 64-bit OS.</returns>
public static UInt16 GetOSAddressWidth()
{
try
{
SelectQuery query = new SelectQuery("select AddressWidth from Win32_Processor");
ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
ManagementObjectCollection moCollection = searcher.Get();
foreach (ManagementObject mo in moCollection)
{
foreach (PropertyData property in mo.Properties)
{
if (property.Name.Equals("AddressWidth"))
{
return Convert.ToUInt16(property.Value);
}
}
}
throw new Exception("Didn't get expected query result from WMI.");
}
catch (Exception ex)
{
throw new Exception("Error occurs in WMI query.", ex.InnerException);
}
}
补充:.NET技术 , C#