cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Paul6151
Level 5

Dynamic File Linking

Scenario:

.ism file is located in "C:\InstallShieldProject1\"
source files (e.g. exe, dll, ocx, etc) are located in "C:\Source\".

supposing, there's no error when the project is compiled. then after that, for some reason i want to transfer the source files to another location, in this case, to : "D:\New_Location\Source\"

if i do this, and will compile the project, there will be errors like these:
1. Could not find the file "..." (-6103)
2. File "..." not found. An error occurred building ... (-6271) , this happens to the items found in Support Files/Billboards.

NOW, HERE'S WHAT I WANT TO DO:

I want to put all related files in one folder, e.g. 'MyProject1' . inside that folder will have the folders 'InstallShieldProject1' for the .ism, and 'Source' for the source files.

Further, if i transfer the parent folder 'MyProject1' to any location, i should not get any errors durig compilation.

Is this possible?

thanks.
Labels (1)
0 Kudos
(11) Replies
Paul6151
Level 5

i think this is necessary also when using a source control software. where one developer might have a different file organization than the other developers. So no matter who's using the .ism file as long as the relative paths are intact, then there should be no problem.
0 Kudos
DebbieL
Level 17

See if the Path Variables view will help you meet your requirements.
0 Kudos
Paul6151
Level 5

Thank you!

That seems to answer one part of the problem.

on the source control part, here's one thing that could happen if i use the path variable.

for example in Machine1, the path is 'c:\Source', and i use this as the value for my path variable ''. After setting up, I checked in the project (especially the .ism file).

then, on Machine2, someone checked out the project. but this time, his project files are located in drive d: . so he compiled the project and had errors about file not found. so what he will do is, he will change the to 'd:\Source' . he compiles the project succesfully and checks it in.

the next time i will checkout the project and compile it, i will surely get an error.
0 Kudos
IlkkaV
Level 7

Consider using Environment path variables. That way you can set whatever is the correct location for your computer into your environment variables and other developers can do the same. The only requirement is that everyone uses a similarly named variable and that the path variable in InstallShield is an environment path variable.
0 Kudos
ericpaul
Level 6

I faced the same challenge as I maintain the project file and our build machine daily builds the software and creates the setup.
The paths are the same, that is, relative to the project folder, but on different disk drives.

For instance,

  • on machine A your project is in C:\somefolder\IS_projects\ and your sources in C:\somefolder\mysources
  • on machine B your project in D:\someotherfolder\ISProjects\ and your sources in D:\someotherfolder\mysources

Suppose you have a Path Variable my_sources, you normally find (on machine A) something like

Name Defined Value Current Value
my_sources C:\somefolder\mysources C:\somefolder\mysources


You can set the path to your sources relative to the IS project folder by using the property in the path.
If you do so, you will find the following setting (in Path Variables) on machine A:
[CODE][FONT="Courier New"]
Name Defined Value Current Value
my_sources \..\mysources C:\somefolder\mysources
[/FONT][/CODE]

As you do not set an absolute path, this will automatically be resolved on machine B:
[CODE][FONT="Courier New"]
Name Defined Value Current Value
my_sources \..\mysources D:\someotherfolder\mysources
[/FONT][/CODE]

The only condition is to have the same path structure relative to the IS Project Folder.

So, I think this will solve your problem without having to resort to any additional actions at the OS level.
0 Kudos
Not applicable

You can substitute the absolute path to a virtual drive;

Suppose "subst t: C:\somefolder\mysources", this can substitute your “C:\somefolder\mysources” to “t”
And in your you can specify the “t:\” in define value.

When you build your ism on different machine with different path, all you have to set “t” drive.
Suppose if you change the source to d drive, You have to set t drive to path d drive
ie subst t: d:\somefolder\mysources
0 Kudos
ericpaul
Level 6

Sure you can, but this requires some work on the various machines where you want to build the setups.
Just using the Path Variables (as shown in my previous post) makes it independent of the machine, as long as the paths relative to the IS project are the same.
This seems to me what Paul6151 really needs.
0 Kudos
Paul6151
Level 5

hello!

I'm gonna try on EricPaul's recommendation first..

Thanks everyone!
I appreciate it. 🙂
0 Kudos
esiemiat
Level 9

I use environment variables for paths in all my projects. I use scripts to make it easier to set them and open the project. Basically, any windows app inherits the environment variables from its parent. If you create a batch script to set the environment variables to whatever you want and then have that script open the project, then that instance of InstallShield will have the paths you were want. For example:


@ECHO OFF
SETLOCAL

SET ENV_VAR1=C:\Source
SET ENV_VAR2=D:\

"C:\Project\Project.ism"
0 Kudos
GEPIII
Level 3

Hi,

I too would like to use an environment variable to point to my source, so that it can be built on an overnight build machine or someone else's macine.

For some reason, when I define a system environment variable and try to use it in Installshield, Installshield can never find the source. I have checked the path locations, environment variable names in both the MyCompter and Installshield, and even tried making the environment variables user rather than system variables. No luck!

Since I am a newbie, I assume there must be something simple that I am missing. Is there some trick to getting this to work?
0 Kudos
esiemiat
Level 9

Does the path assigned to the environment variable show up in the "Path Variables" view in the IDE? If not, the variable is probably not configured properly in InstallShield. Can you take a screen shot of the project's "Path Variables" view and attach it to this thread?
0 Kudos