I need to remove all hard coded source paths from my installaware setup code as per requirement.
Now as we cannot use msicode variables in source path of files I tried to use compiler variables:
For that I have created compiler variable which is used as command line argument at the time of build and used it as per following;
Code: Select all
Install Files #SOURCEPATH#\Bin\* to $BINPATH$, include subfolders
Now what I want to do is if one does not give value to this variable at the time of building, system should apply default path to this variable.
For this I have tried following code:
Code: Select all
[compiler if Variable SOURCEPATH Equals ]
Set Variable #SOURCEPATH# to $PROGRAMFILES$MyProject
[compiler end]
But Installaware gives me error in this code.
[Q.1] How can I assign value to compiler variable at run-time?
[Q.2] Also please let me know how can we apply Environment variable value to Compiler variable?
Thanks,
Chintan