0
votes

I'm going to install a .NET application through installshield. My .NET application has dependency on .NET framework 4.5.2. So I do not want the installation to proceed if .NET framework 4.5.2 prerequisite is not found on the system as soon as the installation begins. How can I achieve this in Installshield 2015?

UPDATE: When I try going the distributables route as suggested by Shahzad I get below error:

Your project contains installshield prerequisites. A setup.exe setup launcher is required.

The project I'm working upon is a basic MSI project. I figured out that it should create a setup.exe instead as an output to resolve this error but I'm not seeing any setup.exe tab as suggested here. Will I see it under Project Assistant tab somewhere or Installation Designer tab?

3

3 Answers

5
votes

I'm elaborating custom software condition methodology so that it can be helpful for someone if they face any difficulty in doing so. Custom software condition can suffice the need when you just want to check the presence or absence of a registry key.

In my specific scenario, In addition to check the presence or absence of a registry key I also had to compare the value of the specific registry key against a predefined value (379893). I achieved it in two step process:

  1. Got to Project Assistant tab. Click Installation Requirements link at the bottom.
  2. Now under More Options section in left pane click Create a custom software condition link.

enter image description here

  1. Click Next on welcome to the System Search Wizard screen

enter image description here

  1. Select Registry Entry

enter image description here

  1. Select the registry key path which tells the exact version of installed .Net framework on any computer. In the Registry Value: (Optional) field type a variable name which will store the value of the key. This variable is later used in creating a comparison condition to check for exact value of .Net framework version. This variable gets appended into the list of a property called SecureCustomProperties. You can see this property in Property Manager under Behavior and Logic on Installation Designer tab

enter image description here

  1. Put the error message which should popup in case the desired .Net framework version is not installed:

enter image description here

  1. Install condition thus formed will now be shown in the list with its checkbox checked on the Project Assistant tab.

enter image description here

  1. Now go to Installation Designer [Tab] -> Behavior and Logic -> System Search. Here you will see a new record which correspond to the software search condition we have created so far. Right click on the row and then click Modify...

enter image description here

  1. Do not change anything on first two screens of the wizard. On the third screen having title What do you want to do with the value? select the Store the value in the property and use the property in an Install Condition radio button. Now click Finish.

enter image description here

  1. Now a new Condition Builder window pops up. Double click Condition column to change it. Change the condition to DOTNETFRAMEWORKRELEASEVERSIONVALUE >= "#379893". You can change your condition based on the .Net framework you want to check as per the details on this link.

enter image description here

1
votes

You can select the version of .Net framework in the installation requirements under Project Assistant tab. Or you can also specify if you want .Net Framework to be installed as part of installation from Installation Designer (Tab) -> Application Data (Navigation Node in left pane) -> Redistributables

You can also create custom requirements from Project Assistant -> Installation Requirements -> Create Custom Software condition. Select Registry Entry from the drop-down to search. In next step, you can provide Registry Root, Registry Key Path and value to look for.

You can also see how to set Registry Comparison Settings

-1
votes

The conditions we have to change as below: enter image description here