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
Application Information
Installation Interview
Installation Designer
Create new component
Rename to DATAFOLDER
Click on the three dots Buttons next to Destination
Click on the three dots Buttons next to Destination
New Component Files
New Component Files
Configure XML Changes
import the XML file
Choose only the elements you need to change
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
Change the dataFolder Parameter to [DATAFOLDER]
Delete the environmentID since we are not changing that
Navigate to Dialogs
right click Clone
Rename the dialog
Select the Location Control
Create new string for the control you are changing by clicking on the three dots
Click New
Enter Value: [DATAFOLDER]
Select DlgTitle Control
Select the three dots the text
Select New
Enter DataFolder
Select LocLabel
Click three dots next to Text
Click New
Enter “Choose Data Directory for [ProductName]:”
Select Bahavior
Select ChangeFolder
Change INSTALLDIR to DATAFOLDER
Select Destination Folder
Select Next
Change NewDialog to DataFolder
Select DataFolder
Select Back
Change New Dialog to Destination Folder
Goto ReadyToInstall
Go to Back
Change DestinationFolder to DataFolder
To DataFolder
Now do a build, and you install, you should see
And when you check your XML file you should see the changes reflected there.
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.
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 https://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”