cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Magnus
Level 6

Relative paths in Prerequisites dont work

I have the .prq files and the .exe (Files To Include) files stored in TFS under \Installation Resources\Prerequisites. In IS2011 -> Tools -> Options -> Prerequisites tab I have set the prq file locations to \Installation Resources\Prerequisites. So far it works fine for me, but the .prq files can not use the to point out the location for the .exe files in the "Files to include" tab.

However in http://www.installsite.biz/en/desc/ix/rn_IS2011_prepro_en.pdf
it says that it should work using relative path if the .exe files are store in the same folder as the .prq files, but I have not got this to work at all in IS2011.


”In addition, if the files that you are adding are stored in the same folder as the InstallShield
prerequisite's .prq file—or a subfolder of the folder that contains the .prq file—the InstallShield Prerequisite Editor
uses a relative path for the file in the .prq file.”

What am I doing wrong?
Labels (1)
0 Kudos
(5) Replies
Magnus
Level 6

OK, I've just found the solution. Just open the prq file in notepad and type:




to get a relative path. The pqr-editor will still show the full path.
0 Kudos
CHOeld
Level 4

How did you figure this out? Is "PrqLocalFiles" an InstallShield variable or something you defined?
0 Kudos
Christopher_Pai
Level 16

You can use inside the PRQ files also.
0 Kudos
Magnus
Level 6

CHOeld: "PrqLocalFiles" is just a subfolder defined by me, where I store my prerequisites .exe and msi files.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I'd have to run some tests to be certain, but I believe the behavior is now to represent file paths relative to the location of the .prq file. That is if you are editing the .prq file C:\MyPrereqs\Some.prq and add the file C:\MyPrereqs\Some Data\Some.dat to it, it will be referenced in the resulting prerequsite as .\Some Data\Some.dat. This is re-evaluated every save, so if you save a new copy elsewhere, the relative paths are updated.

There' are a few more considerations that might have made this harder for you to test:

  • If instead you add a file from a known location like C:\Windows\Notepad.exe, it refers to it as [WindowsFolder]Notepad.exe, etc.
  • If there is no useful relation between the location of the .prq file and the file added to the prerequisite, you'll either get a raw path, or a really messy relative path.
  • If you have prerequisites created in earlier versions of InstallShield, you'll need to load and save these prerequisites before the relative path will be applied.
Does that explain and clean up the behavior you saw?
0 Kudos