Using target folders in variables

Got a problem you cannot solve? Try here.
sol952
Posts: 24
Joined: Thu Apr 21, 2016 9:20 am

Using target folders in variables

Postby sol952 » Fri May 20, 2016 8:25 am

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.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Using target folders in variables

Postby FrancescoT » Fri May 20, 2016 11:56 am

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

sol952
Posts: 24
Joined: Thu Apr 21, 2016 9:20 am

Re: Using target folders in variables

Postby sol952 » Fri May 20, 2016 12:50 pm

Ah. Ok that's why the create folder was working with that variable but the set variable wasn't. Thank you

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Using target folders in variables

Postby FrancescoT » Fri May 20, 2016 1:25 pm

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Baidu [Spider] and 92 guests