Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

customizing the MSI for diff. environments

Updated: 21 May 2010 | 6 comments
Dhanya's picture
0 0 Votes
Login to vote

I have created an MSI using SetupCapture, for a tool that has to connect to SQL server .
I want to update the connection settings like the database name, admin username and password that is captured in the original setup, as the software has to be installed in multiple environments with different databases.
When I compile to an EXE & INI, only the public properties show up in the INI.
How do I access the connection strings an the other variables captured?

discussion Filed Under:

Comments

EdT's picture
30
Jul
2009
0 Votes 0
Login to vote

You will need to use public properties in your SQL info

In order to pass parameters into your MSI install, you will need to use public properties to pass the details of your connection strings, instead of having them hard coded.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Dhanya's picture
30
Jul
2009
0 Votes 0
Login to vote

some more info please...

I dont understand...

How do I figure out which public properties are the placeholders for these parameters?
I am intending to display the default values to the user, which he can edit before the installation starts/ MSI is executed. If I create any new public property (if possible), how do I know that the MSI will recognise it and update the connection string?

EdT's picture
30
Jul
2009
0 Votes 0
Login to vote

Verbose log

If values are hard coded in a script then there may not be any public properties associated with them. Your job as a packager may require you to replace hard coded values with public properties, and the way this is achieved will vary according to the specific requirements of each application.
The easiest way to find out whether a property is used for a particular parameter, is to enable verbose logging of your MSI install and have a look at the log after you have installed with the preset values.
Each stage of the install is recorded in the log, as well as the contents of every property, whether public or private, that is referenced in the install. Thus if you have specified "myusername" as a username, then search the verbose log for instances of "myusername" and see if there are any instances in the log which are associated with a property value.

Unfortunately I don't recall exactly how the SQL parameters are stored in the MSI, but perhaps one of the other forum members will be able to help with this.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VBScab's picture
30
Jul
2009
0 Votes 0
Login to vote

You will need to create a new

You will need to create a new dialog for the package, using the public properties for the text-box controls that you will add. Luckily, WPS provides a ready-rolled one.

- choose 'Setup Editor' view
- select the 'Dialogs' tab
- select the dialog BEFORE which you want your new dialog to appear
- right-click the dialog name and select 'New' then 'Dialog'
- select 'SQL Connection Dialog' from the list
- click 'Next'
- edit the resulting 'Dialog Properties' so that the dialog uses and sets public properties, i.e. by using all upper-case letters for the property name

You can add additional text-boxes for database name and so on, meaning that you may have to shuffle the controls around or make them smaller.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

Dhanya's picture
07
Aug
2009
0 Votes 0
Login to vote

not what I am looking for

Ed,

I cannot see the details I gave in the logs, so they are private.

VBScab,

I was hoping to modify the same property that was set during setup capture. Besides, they are some more parametes present other than the one's in the 'SQL connection Dialog'.
Thanks anyways!

I have thought of a workaround. Luckily, the vendor installer provides an autoInstall.xml that captures the parameters in an encrypted form. Now, this is just one of the components that I will be packaging to create an integrated installer along with SQL client, oracle client etc. Is there a way by which the MSI can read this xml and display it on a dialog?, else I will have to use java programming to do this. I hope a java application can be run using MSI scripting.

EdT's picture
07
Aug
2009
0 Votes 0
Login to vote

MSI cannot read encrypted XML

The basic functions of an MSI are determined by the standard actions in it. Anything else in the way of additional functionality you need has to be written as a custom action. Decrypting an encrypted file would fall into this category.

Running custom actions in any scripting language is perfectly possible with MSI.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.