cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
seckhart
Level 3

Prerequisite condition behavior changed?

Hello,

I recently upgraded from IS 2009 to IS 2011 and noticed that a prerequisite that ran before is not running after the upgrade. My prerequisites are not in the default location, so I updated the prerequisite path in Tools -> Options -> Prerequisites tab. I've tried removing the prerequisite, pressing the refresh button in the Redistributables view, and adding it back. I have also created a new prerequisite with the same conditions and still it does not work. Here are the prerequisite conditions:
-A registry entry has a specified value
-Registry key name: HKEY_LOCAL_MACHINE\Software\...
-Registry value name: DLLPath
-Registry value data to check is left blank (I want to check if the DLLPath registry value is a blank string)
-Run prerequisite if: Data on target system is equal to specified data. In IS2009 the value was set to "is equal to"

It looks like the project settings upgraded to IS2011 as expected. Did the logic behind "is equal to" change in IS 2011 if the value being checked is a blank?

I realize this is probably not the best way to check the prerequisite condition, but it has been working for years so what has changed now?

Thanks!
Steve
Labels (1)
0 Kudos
(6) Replies
Shuttledude
Level 7

In addition to copying the *.prq file to the new location, have you also moved the prerequisite files themselves? For example, if you have a new prerequisite file called MyPrerequisite.prq make sure it is located at:

C:\Program Files\InstallShield\2011\SetupPrerequisites

and that the files themselves are at:

C:\Program Files\InstallShield\2011\SetupPrerequisites\MyPrerequisite
0 Kudos
hidenori
Level 17

Make sure that you have the registry value name with the blank value data on your target system. If the registry key or value name does not exist, the condition evaluates to false.
0 Kudos
seckhart
Level 3

I double checked and the .prq files and the prerequisite files themselves are in the correct location. I hadn't thought of that originally, so thanks for suggesting that I check...

Did the behavior change in IS2011 or IS2010 with how it handles a registry key/value name that does not exist? In IS2009 if the registry key/value name does not exist, the condition evaluates to true (the item appears in the prerequisite list). But in IS2011 if the registry key/value name does not exist, the item is not in the prerequisite list.

Thanks for your replies!
0 Kudos
hidenori
Level 17

The behavior has been corrected in InstallShield 2011 so the condition evaluates to true only if the registry value name exists with the specified value data. Previously, the condition also evaluated to true if the registry key/value name does not exist.
0 Kudos
seckhart
Level 3

Yep, that explains it. It's too bad, that "feature" actually worked to our advantage with the older versions of InstallShield 🙂 . I'll have to try and find a new condition to test for IS2011. Thanks a bunch for your explanation!
0 Kudos
seckhart
Level 3

I found a solution that will work at least for my situation. I used similar settings to check the registry, except instead of leaving a blank string I used a single space character and changed the comparison to 'less than':

-A registry entry has a specified value
-Registry key name: HKEY_LOCAL_MACHINE\Software\...
-Registry value name: DLLPath
-Registry value data to check: a single space character ' '
-Run prerequisite if: Data on target system is less than specified data

Since the value of DLLPath will usually be in the form "C:\..." it's almost a guarantee that any valid path will evaluate to larger than the space character. Also, it seems to handle the case of the registry key missing completely (it will run the prerequisite). I was using this condition to check if the Borland Data Engine (BDE) is installed.
0 Kudos