System Search Registry with MsiGetProperty
I defined a System Search in my project like this:
Registry Root: HKEY_LOCAL_MACHINE
Registry Key: SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
Registry Value: InstallPath
Search the 64-Bit Portion of the Registry: Checked
function GetWindowsInstallerProperty(PropertyName, /* output */ VariableName)
Size = 3000;
MsiGetProperty(ISMSI_HANDLE, PropertyName, PropertyValue, Size);
VariableName = PropertyValue;
Although the registry key exists (for both 32bit and 64bit) I'm getting nothing as value back.
This is a project I inherited from someone at the company, so I don't even know if MsiGetProperty is the correct way of doing it.
I logged everything and PropertyName is coming in the function properly as "DOTNET_FRAMEWORK_PATH".
Tried a few things but nothing makes it work (Run installer as administrator, run it on a Server, ...)
Thx, Lieven Cardoen
When executing the installer with debugging I'm able to see following things:
AppSearch: Property: DOTNET_FRAMEWORK_PATH, Signature: NewSignature11
MSI (c) (F0:C0) [15:28:56:462]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (F0:C0) [15:28:56:462]: PROPERTY CHANGE: Adding DOTNET_FRAMEWORK_PATH property. Its value is 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'.
20) [15:29:38:573]: PROPERTY CHANGE: Adding DOTNET_FRAMEWORK_PATH property. Its value is 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'.
Property(S): DOTNET_FRAMEWORK_PATH = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
So I guess the value is found in the registry but MsiGetProperty does not return the value...
Thx, Lieven C.