Created a msi where the text file changes based on an environment variable.
%RFIDMAC
created property
RFIDMAC = [%RFIDMAC]
Referenced Text File Change [RFIDMAC]
However, when created system variable RFIDMAC = 00-00-00-00-00-00
ran MSI, and the text file does not populated with 00-00-00-00-00-00 but rather with [%RFIDMAC]
Feb 08, 2021 12:07 PM
Hello Hai_diep,
You can get the environmental variable into a MSI Property with a simple Installscript Custom action.
For example:
function MyFunction(hMSI)
// To Do: Declare local variables.
STRING pathvar;
begin
// To Do: Write script that will be executed when MyFunction is called.
GetEnvVar("Path",pathvar);
MsiSetProperty(hMSI,"TESTENV",pathvar);
end;
Schedule the CustomAction early in the UI Sequence. Even first action should work.
Then you can use [TESTENV] in the Replace With section of the Text File Changes->Change.
Feb 08, 2021 03:11 PM