如果您有該軟件已經安裝,你可以使用找到產品ID的系統:
Get-WmiObject -Class Win32_Product | fl Name,Version,InstallDate,InstallSource,PackageName,IdentifyingNumber
輸出示例:
Name : Dell OpenManage Systems Management Software (64-Bit)
Version : 7.3.0
InstallDate : 20131009
InstallSource : c:\Installs\OMSA\
PackageName : SysMgmtx64.msi
IdentifyingNumber : {7CB08DC5-EA02-4076-BA7D-AD7736A3DE71}
Name : Microsoft ASP.NET MVC 4 Runtime
Version : 4.0.40804.0
InstallDate : 20141111
InstallSource : C:\windows\TEMP\IXP000.TMP\
PackageName : AspNetMVC4.msi
IdentifyingNumber : {3FE312D5-B862-40CE-8E4E-A6D8ABF62736}
哪裏IdentifyingNumber是GUID應該在包裝資源使用。上述戴爾軟件示例:
package OMSA
{
Name = 'Dell OpenManage Systems Management Software (64-Bit)'
...
ProductId = '7CB08DC5-EA02-4076-BA7D-AD7736A3DE71'
Arguments = ...
}
我對你的所有問題都感興趣,但他們應該是每一個單獨的職位。理想情況下,每個職位應集中在一個客觀問題上。 – julealgon