cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Naveed
Level 6

How to include a configuration file with Basic MSI installer

I want to include a configuration file with InstallShield MSI installer.

Custom actions in Basic MSI Setup will read configurations from that file.

How can I include a file which is not embedded in MSI package; but is installed as a separate file in package. e.g. Release Folder contains both MSI Setup and a config file. User double clicks MSI package to run installer. installer then reads config information from the configuration file.

How can I accomplish this using InstallShield 2010?


Thanks in advance.
Naveed
Labels (1)
0 Kudos
(13) Replies
cbragg
Level 7

I'm reading this post two ways, which are you referring to? Is it that you:

Have an application configuration file that you want administrators to modify at source before deploying?

Or...

You want a configuration file to control the installation behaviour like an answer file
0 Kudos
Naveed
Level 6

I want a configuration file to control the installation behaviour like an answer file.

e.g. Setup creates a domain account in vbs custom action as part of installer. I want to read the domain account name & password from configuration file.
0 Kudos
cbragg
Level 7

Rather than using an answer file, have you thought about using public properties because this is what they are designed for. A public property is just a regular property that can be added to the property table. You specify the names as in all caps, the uppercase is very important because this is what defines a public property. A public property can then be used on the commandline like this:

msiexec /i mypackage.msi MYPUBLICPROPERTY="myValue"
0 Kudos
Naveed
Level 6

you are right. Public properties are an option. However, I want a configuration file because there are 10+ parameters required for installer. User can easily change/edit parameters in file.It will he harder to do from command line.

Here is what I wanna do. I want to set the public properties from the values given in configuration file. Any idea how I can accomplish such solution?

Thanks
Naveed
0 Kudos
cbragg
Level 7

You won't be able to do this out of the box but i suggest you read a file (xml might make the job easier) using a vbscript custom action running in immediate mode before the cost finalize action. There are plenty of examples of reading xml files using vbscript on the web. The biggest problem you have though is that you have no property value for the directory that the msi is running from, so you might need the administrator to put the file on the root of the c drive and use [WindowsVolume] or in system32 and use [SystemFolder] which is a bit nasty i'm afraid. When you have the value from the xml file then you can populate your msi properties using vbscript using something like this:

session.property("MYPROPERTY") = "MyValue"

Hope this helps 🙂
0 Kudos
Naveed
Level 6

Thanks cbragg for your reply. It solves the problem to some extent.

Isn't it possible that we keep some of our stuff outside MSI package. e.g. When we install visual studio from MSI file, a lot of resource files are out the msi package in the folder where msi file is present. when msi runs, it reads/installs the files onto target. I was thinking of something like this.

Folder where .msi Setup is present it contains few files, configuration, user changes the settings in file and then launches setup.
0 Kudos
cbragg
Level 7

That is just uncompressed external media. This is the contents of your msi externally. Some bootstrap setup executables are also capable of running extra actions but i don't believe Installshield setup exes can do this. The problem is you want yours before installation, not after. Installshield does have a support files directory but this squirrels it away in the temp directory under a guid folder and you want the user to be able to find it to modify it.

Can't most of these 10 properties be defaulted and then the user only has to specify the ones that are different for them
0 Kudos
Naveed
Level 6

All the 10 properties be can be defaulted. But how will user update it then? If we want to run it in silent mode. So if we don't want any dialogs, only option is file.
0 Kudos
cbragg
Level 7

The command line would be something like:

msiexec /i "c:\myinstaller.msi" MYPROPERTY1="myvalue1" MYPROPERTY3="myvalue3" /qn

Now you'll see that i have only specified the two properties that i need to change. All the properties will be stored in the property table with their values all set to default. The command line i provided will only override those defaults for the two i provided.

Just make sure you make a good guide for administrators to follow.

One other way you could do it is to explain to the administrator in your guide how to create a transform file using orca which is also an answer file of sorts
0 Kudos
Naveed
Level 6

Thanks cbragg.

You have provided valuable info. Public properties are the best solution if I want to invoke installer through command prompt/shell.

What do you suggest for invoking the msi by double clicking it? How should I supply parameters if I am running the package directly by double-clicking it?
0 Kudos
cbragg
Level 7

Well if it's a straight forward double click then you'd just be populating those properties using the dialogs wouldn't you?
0 Kudos
Naveed
Level 6

Here is the difficulty. My client wants file based parameters even in case of double click launch of MSI package 😞

Is there a way out?

I also tried using properties as well. Doesn't property values persist? I changed a property value on Install. But when I tried UnInstall, the modified property value was not persisted? If they don't persist even setting properties from command line wont work!
0 Kudos
Marktech29
Level 2

#5 Today, 11:51 AM
Marktech29
New User (0 Posts) Join Date: Nov 2009
Posts: 1

Basic MSI Project Using SCCM

--------------------------------------------------------------------------------

I need to create a MSI File that will edit my remote users running Roxio Software. I am trying to disabled startup check for an update options. I called Roxio, and they gave me a registry setting that will disable this feature. That problem that I am having is that when I create the Basic MSI file and push it out through SCCM (System Center Configuration Manager) it installs on the remote machine, but it never edited the registry. Can someone out there provide me some guidance on how to do this?

I'll really appreciate I have been breaking my weeks now.

Regards
0 Kudos