Summary
When using MSBuild to build the InstallShield installation, the InstallShield project Path Variables values can be overridden.Synopsis
When using MSBuild to build the InstallShield installation, the InstallShield project Path Variables values can be overridden. This article explains the necessary configurations that must be made to accomplish the override.Discussion
To override the Path Variables when building the installation package via MSBuild, three configurations must be made:
- Add a Path Variable in the InstallShield project (the .ism file).
- Add a Path Variable override in the InstallShield target file for MSBuild.
- Add an ItemGroup element in the .isproj file to override the Path Variable value(s).
Add a Path Variable in the InstallShield project:
- Open the InstallShield Project .ism file under the InstallShield IDE Installation Designer tab.
- Go to the Media ? Path Variables view.
-
Search through the Path Variables table to see if a Path Variable has already be defined for the Path. If one has not already been defined, then add a new row to the table, and add a Path Variable.
-
Add a unique Path Variable, e.g., PATH_TO_APP_FILES.
-
Set the Defined Value to the location on the file system.
-
Set the Path Variable type to standard.
-
- If static files have already been added to components and they are not defined using Path Variables, the existing static links can be converted to path variables with the Convert Source Paths Wizard.
- Build the project from the IDE to verify the Path Variable changes are defined correctly.
Add a Path Variable override in the InstallShield target file for MSBuild:
- Locate the folder containing the InstallShield target file. The path of the file is different, depending on the release of InstallShield.
- For InstallShield 2008, typically, this file can be found in directory path <C:\Program Files\MSBuild\Macrovision\IS2008> and the file name is Macrovision.InstallShield.targets.
- For InstallShield 2009, typically, this file can be found in directory path <C:\Program Files\MSBuild\InstallShield\2009> and the file name is InstallShield.targets.
- For InstallShield 2010, typically, this file can be found in directory path <C:\Program Files\MSBuild\InstallShield\2010> and the file name is InstallShield.targets.
- Open the InstallShield targets file with a text editor (i.e., Notepad).
- Scroll down to the bottom of the file and verify the 'Path Variables' definition is included in the InstallShield element. If the definition is not there, add it. Below is a sample InstallShield element that includes 'Path Variables':
<InstallShield InstallShieldPath="$(InstallShieldPath)" Project="@(InstallShieldProject)" ProductConfiguration="$(InstallShieldProductConfiguration)" ReleaseConfiguration="$(InstallShieldRelease)" ReleaseFlags="@(InstallShieldReleaseFlags)" OutputGroups="@(TaggedOutputs)" MergeModulePath="@(InstallShieldMergeModulePath)" ProductVersion="$(InstallShieldProductVersion)" PropertyOverrides="@(InstallShieldPropertyOverrides)" PathVariables="@(InstallShieldPathVariableOverrides)"></InstallShield>
- If the InstallShield.targets file was modified, then save the file.
Add the InstallShieldPathVariable ItemGroup to the .isproj file:
- In the same Visual Studio projects folder that contains the InstallShield project .ism file, open the <InstallShield Project Name>.isproj file using a text editor, such as Notepad.
- Find the ItemGroup that imports the InstallShield.targets file. After this ItemGroup, add a new ItemGroup for each Path Variable to be overridden. Below is a sample ItemGroup to override a Path Variable named PATH_TO_APP_FILES with a path location of <C:\Work\AppFiles>:
<ItemGroup><!-- Override Path Variables for the project -->
<InstallShieldPathVariableOverridesInclude="C:\Work\AppFiles">
<PathVariable>PATH_TO_APP_FILES</PathVariable>
</InstallShieldPathVariableOverrides></ItemGroup>
- Save the modified .isproj file.
Additional Information
When building with MSBuild, Path Variable overrides are ignored
Related Articles
Verbose Build Log with MsBuild 18Number of Views HOTFIX: 64 bit System Variables Resolves to 32 bit Path During an Upgrade 4Number of Views Trying To Use MSBuild.exe To Build Our Solution Is Failing 7Number of Views Error building in TFS Build/MSBuild referring to VSSolutionFolder when there is a parenthese in the solution name 4Number of Views Target SVM packages with "Path Applicability" rules 13Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago