Adding a custom dialog to and Installshield Basic MSI project

I needed to add a new custom dialogue to a MSI basic project that captures a new path for the data folder for a project. The dialog should take the INSTALLPATH add DATADIR, then allow the user to change the path. On install the DATADIR path will be inserted into an app.config xml file so the application knows where to look

Create a new Basic MSI Project

image001

Application Information

image003

Installation Interview

image005

Installation Designer

image007

Create new component

image009

Rename to DATAFOLDER

image011

Click on the three dots Buttons next to Destination

image013

image016

Click on the three dots Buttons next to Destination

 

image017

image019

New Component Files

image021

image023

New Component Files

image025

Configure XML Changes

image027

import the XML file

image029

image031

Choose only the elements you need to change

image033

image035

Take out the xpath information that searches for specific elements in the config file, we just want it to match on runtime element, not the dataFolder orenviromentId

image037

Change the dataFolder Parameter to [DATAFOLDER]

image039

Delete the environmentID since we are not changing that

image041

Navigate to Dialogs

image043

right click Clone

image045

Rename the dialog

image047

Select the Location Control

image049

Create new string for the control you are changing by clicking on the three dots

image051

image053

Click New

image055

Enter Value: [DATAFOLDER]

image057

image059

Select DlgTitle Control

image061

Select the three dots the text

image063

image065

Select New

image067

Enter  DataFolder

image069

Select LocLabel

image071

Click three dots next to Text

image073

image075

Click New

image077

Enter “Choose Data Directory for [ProductName]:”

image079

Select Bahavior

image081

Select ChangeFolder

image083

Change INSTALLDIR to DATAFOLDER

image085

image087

Select Destination Folder

image089

Select Next

image091

Change NewDialog to DataFolder

image093

image095

Select DataFolder

image097

Select Back

image099

Change New Dialog to Destination Folder

image101

image103

Goto ReadyToInstall

image105

Go to Back

image107

Change DestinationFolder to DataFolder

image109

To DataFolder

image111

Now do a build, and you install, you should see

Screen Shot 2014-08-22 at 3.41.32 PM

And when you check your XML file you should see the changes reflected there.

2 thoughts on “Adding a custom dialog to and Installshield Basic MSI project

  1. Bhavik Patel

    Hello Nice documentation.
    I’m following all the steps but I’m getting below error

    Can You please help me on this ?

    Error 1 -5002: Product Configuration ‘Default Configuration’ is not found in the specified project. Verify that the Product Configuration name is correct. ISDEV : error : -5002: Product Configuration ‘Default Configuration’ is not found in the specified project. Verify that the Product Configuration name is correct.

    Reply
    1. Ian Macdonald Post author

      Installshield errors are always hard, it sounds like you have a haven’t built a release project yet or deleted the default one, try following the steps in http://www.iwasdot.com/create-a-basic-msi-project/ to create a basic project, specifically I am thinking about the “Choose Build Installation” Step down to and including clicking on the “Build Installations” button. If my guess about your error is correct then if you expand Releases there wont be a Release configuration called “Default Configuration”

      Reply

Leave a Reply

Your email address will not be published.