[英]How to get “INSTALLED” property in Custom Action DLL (MSI/Wix)?
In my custom DLL I need to check if product is being installed or uninstalled, and hence need to get value of "INSTALLED"
property (just like in WiX script). 在我的自定义DLL中,我需要检查是否要安装或卸载产品,因此需要获取
"INSTALLED"
属性的值(就像在WiX脚本中一样)。 Here is what I am doing in C++ DLL: 这是我在C ++ DLL中所做的事情:
WCHAR propValue[MAX_PATH];
DWORD propValLen = MAX_PATH;
// MSIHANDLE msiHandle;
MsiGetProperty(msiHandle, L"INSTALLED", propValue, &propValLen);
propValue[propValLen] = 0;
But the outcome is always an empty string (for both installation and uninstallation)! 但是结果始终是一个空字符串(用于安装和卸载)! How check if product is being installed or uninstalled?
如何检查产品是否已安装或卸载?
属性名称区分大小写,“已安装”: https : //msdn.microsoft.com/zh-cn/library/windows/desktop/aa369297(v=vs.85).aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.