cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynamic property system variable text file change

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]

 

 

 

 

0 Kudos

This thread has been automatically locked due to inactivity.

To continue the discussion, please start a new thread.

1 Reply
ayung_2831
Level 6 Flexeran
Level 6 Flexeran

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.

0 Kudos