Page 1 of 1

Using target folders in variables

Posted: Fri May 20, 2016 8:25 am
by sol952
Are you not allowed to use target folders when setting other variables? I have the block below

Code: Select all

     Create Folder $COMMONAPPDATAFOLDER$\foo\bar\Archive\temp
     Set Variable TempPath to $COMMONAPPDATAFOLDER$\foo\bar\workspace
     Set Variable ZipPath to $COMMONAPPDATAFOLDER$\foo\bar\Archive\Pre($TITLE$.1)\workspace.zip
     MessageBox: , $TempPath$ $ZipPath$ $COMMONAPPDATAFOLDER$


In the first line the folder is created in the expected location but when I set the variables in the next two lines they show up in the message box with $COMMONAPPDATAFOLDER$ to start instead of the value that should replace it. I have this block near the beginning of my projects main msicode script.

Re: Using target folders in variables

Posted: Fri May 20, 2016 11:56 am
by FrancescoT
Dear Sol952,

the "Create Folder" command is a "Windows Installer Command" (PURPLE COMMANDS), due of this the command doesn't get executed immediately (...before the "MessageBox" statement) but instead, its effective execution is deferred to "Apply Install" execution.
http://www.installaware.com/forums/viewtopic.php?f=2&t=4338

That said;

- Are you sure that your COMMONAPPDATAFOLDER variable gets initialized before the "MessageBox" statement?

Regards

Re: Using target folders in variables

Posted: Fri May 20, 2016 12:50 pm
by sol952
Ah. Ok that's why the create folder was working with that variable but the set variable wasn't. Thank you

Re: Using target folders in variables

Posted: Fri May 20, 2016 1:25 pm
by FrancescoT
:D