This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Path Variables in Path Variables
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 20, 2010
11:19 AM
Path Variables in Path Variables
In my MSI project, I'd prefer to construct my path variables as follows:
PATH_ROOT.....C:\
PATH_A...........\FilesA\
PATH_B...........\FilesB\
I.e., I try to create one 'root' path variable and then use that variable in other path variables so if the root path changes, I only have to change it in one spot. What I was hoping to do was override the PATH_ROOT variable via a command line call to IsCmdBld.exe, using the -l parameter (path override parameter).
However, when I do this, the paths that contain don't seem to get updated; they still point to whatever the default PATH_ROOT was, in this case C:\.
Am I trying to accomplish something that can't be done? Do I have to override all the path variables instead of just PATH_ROOT? (Overriding all the parameters seems to work, but then there's no point in me trying to be efficient and use the PATH_ROOT variable 😞 )
PATH_ROOT.....C:\
PATH_A...........
PATH_B...........
I.e., I try to create one 'root' path variable and then use that variable in other path variables so if the root path changes, I only have to change it in one spot. What I was hoping to do was override the PATH_ROOT variable via a command line call to IsCmdBld.exe, using the -l parameter (path override parameter).
However, when I do this, the paths that contain
Am I trying to accomplish something that can't be done? Do I have to override all the path variables instead of just PATH_ROOT? (Overriding all the parameters seems to work, but then there's no point in me trying to be efficient and use the PATH_ROOT variable 😞 )
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 21, 2010
07:44 AM
You don't say what you're doing with these paths, so I'm going to think of them as being used to construct pickup paths for your components. Here's what I'm thinking:
Component1's pickup path:\FilesA
Component2's pickup path:\FilesB
or if you'd like the path to FilesA and FilesB to be dynamic, also set them at build time:
Path Variables:
PATH_ROOT = C:
FilesA = parentfolder1\subfolder1
FilesB = parentfolder2\subfolder2
Components:
Component1's pickup path:\
Component2's pickup path:\
Also consider using the Automation Interface to update your Path Variables. Do a search on "InstallShield IswiAuto" and you'll get a number of hits, and ask questions here if you need to. I used to use the -l command line argument, but I've switched over to the Automation Interface.
Component1's pickup path:
Component2's pickup path:
or if you'd like the path to FilesA and FilesB to be dynamic, also set them at build time:
Path Variables:
PATH_ROOT = C:
FilesA = parentfolder1\subfolder1
FilesB = parentfolder2\subfolder2
Components:
Component1's pickup path:
Component2's pickup path:
Also consider using the Automation Interface to update your Path Variables. Do a search on "InstallShield IswiAuto" and you'll get a number of hits, and ask questions here if you need to. I used to use the -l command line argument, but I've switched over to the Automation Interface.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 21, 2010
08:25 AM
Thank you for your reply.
The paths I'm referring to are the "Link to" paths for each file within a component. At least in my projects, if you click on the "Files" section of a component, then select a file, there is a "Link To" column displaying the file path where each file is picked-up.
My PATH_ROOT path variable doesn't have to be as simple as C:\. This path is the common folder path that most of the other file paths share. So, it could be something like:
PATH_ROOT.....C:\Projects\ProjectA\Branch1\
PATH_A...........\FilesA\
PATH_B...........\FilesB\
So if I had an assembly in a component called "MyAssembly.dll" and it's "Link To" path was defined as "", I'd expect that it's full path would be:
C:\Projects\ProjectA\Branch1\FilesA\MyAssembly.dll
However, if I changed the PATH_ROOT using the -l switch to "D:\OtherProjects\" when calling IsCmdBld.exe, I'd expect the path of "MyAssembly.dll" to then be:
D:\OtherProjects\FilesA\MyAssembly.dll
However, this doesn't seem to work. The path stays at whatever I originally set PATH_ROOT to.
The paths I'm referring to are the "Link to" paths for each file within a component. At least in my projects, if you click on the "Files" section of a component, then select a file, there is a "Link To" column displaying the file path where each file is picked-up.
My PATH_ROOT path variable doesn't have to be as simple as C:\. This path is the common folder path that most of the other file paths share. So, it could be something like:
PATH_ROOT.....C:\Projects\ProjectA\Branch1\
PATH_A...........
PATH_B...........
So if I had an assembly in a component called "MyAssembly.dll" and it's "Link To" path was defined as "
C:\Projects\ProjectA\Branch1\FilesA\MyAssembly.dll
However, if I changed the PATH_ROOT using the -l switch to "D:\OtherProjects\" when calling IsCmdBld.exe, I'd expect the path of "MyAssembly.dll" to then be:
D:\OtherProjects\FilesA\MyAssembly.dll
However, this doesn't seem to work. The path stays at whatever I originally set PATH_ROOT to.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 21, 2010
08:58 AM
Ok, so then everything I said applies.
Can you not make your Link To path this:
\FilesA
and
\FilesB
?
Can you not make your Link To path this:
and
?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 21, 2010
09:07 AM
GarrettDyer wrote:
Can you not make your Link To path this:\FilesA
and\FilesB
How would I do that? Seems like InstallShield just wants (or creates) a path variable when ever I add a new file to a component. I don't see any way to modify the "Link To" path(?)
(FYI... although I've been using InstallShield for quite a while, I'm hardly an expert, so pardon me if I don't know how to do something that I really should know how to do 😉 )
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 21, 2010
09:27 AM
You and me both, so don't sweat the ignorance. It's a complex monster, to be sure...
You're using Dynamic Links, correct...and is it a MSI or InstallScript project? Maybe I'm assuming incorrectly. Either way, you should just be able to type that value in.
When you originally add the component, it may create a new Path Variable for the given component's file pickup path, but I always go back and make sure it makes sense, because it can't know the absolute best way to create the variable. You should be able to type over whatever it assigns as the path variable name, and then adjust your path variables accordingly.
You're using Dynamic Links, correct...and is it a MSI or InstallScript project? Maybe I'm assuming incorrectly. Either way, you should just be able to type that value in.
When you originally add the component, it may create a new Path Variable for the given component's file pickup path, but I always go back and make sure it makes sense, because it can't know the absolute best way to create the variable. You should be able to type over whatever it assigns as the path variable name, and then adjust your path variables accordingly.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 21, 2010
09:34 AM
I typically don't use Dynamic Links for projects that aren't web applications. The "Link To" path is not editable for a file within a component when not using Dynamic Links 😞
InstallShield seems to suggest it's a best practice to not use Dynamic Linking:
http://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/DFL-Limitations.htm
InstallShield seems to suggest it's a best practice to not use Dynamic Linking:
http://kb.flexerasoftware.com/doc/Helpnet/installshield16helplib_sp1/DFL-Limitations.htm
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 21, 2010
11:07 AM
Ah, I see what you're saying now...there's no way to adjust the path to the given Static-linked file. Bummer.
Guess you'll need to adjust 2 Path Variables in your build, then...
Guess you'll need to adjust 2 Path Variables in your build, then...