- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- System Search Registry with MsiGetProperty
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
System Search Registry with MsiGetProperty
Hi,
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
In script:
function GetWindowsInstallerProperty(PropertyName, /* output */ VariableName)
NUMBER Size;
STRING PropertyValue;
begin
Size = 3000;
MsiGetProperty(ISMSI_HANDLE, PropertyName, PropertyValue, Size);
VariableName = PropertyValue;
end;
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Do you see the call to your script function "GetWindowsInstallerProperty" in the msi log file ?
regards
Markus
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)