tags:

views:

218

answers:

3

My installer requires there be two files in the same directory in order for it to install.

  1. The installer (.msi file)
  2. An organization specific config file that the installer copies. (This file is customized by the organization and then distributed to it's end users).

Since there are two files, the file has to be distributed as a zip file. Which presents the issue of if a user tries running the .msi without actually extracting the zip... only the msi file gets extracted. I am able to detect the issue in the install process and tell the user they need to unzip the file... but you know how noone actually reads error messages.

So, I'd like to make it more foolproof and so i was wondering if there was a simple tool that i could let my customers (ie the organization) be able to make modifications to the config file and when finished create a .exe file which when clicked would extract to a temp folder and then run the msi. I know there are solutions for this which require commercial software. I'm wondering if a simple freeware tool exists that can do this.

Edit: Accepted Solution Notes:

The one issue i ran into is the iexpress wasn't designed to be used for .msi files. As a result on the step that asks you for the Install Program. It's a combo box which if you had added a .exe file in the previous step could just select the .exe file from. Instead you have to manually type in

 msiexec /i yourinstaller.msi

I was very pleased to find such a simple solution that's built in to windows. The only way this could be better is if it allowed for wildcards so that your iexpress project would be able to handle changes in the msi file's name which occur with each version. And defaulting the Install Program to the .msi file. These minor inconveniences are offset by the fact that end user wouldn't need to install any new software to create the package so I have stopped looking for other tools.

A: 

The Wix project has a bootstrapper and packager for dealing with this kind of thing.

I've used wix a lot but haven't really looked at the bootstrapper/packager much - last time I had a quick look it wasn't really usable but that was a long time ago so it may be better now.

Orion Edwards
Looking for something a non-programmer can use.
blak3r
+1  A: 

You could try using iexpress.

It enables you to package up a set of files which can be extracted, with the option of running an installation command automatically after extraction. It also has options to enable you to prompt users about things, show a EULA, restart the computer, etc..

I believe it comes as part of Windows (part of IE?) - try running iexpress.exe from the run dialog to get the UI.

adrianbanks
That is EXACTLY the type of tool i was looking for. For some reason i'm getting an "Error creating process error". I'll play around with it some more. Thanks!
blak3r
Got it working. When packaging an MSI for the Install Program you must specify "msiexec /i [msiname]"
blak3r
A: 

I'm guessing that the config file is something like a properties file, and that you want users to set the values of the properties "foo" and "bar". You don't need a separate tool to update the file.

I would do this:

  • Put one or more dialogs in the install that ask the user what the values of foo and bar should be, and set a couple public properties accordingly.

  • Write a custom action that writes the config file out to whatever location you want, including whatever values you want for foo and bar. This would be pretty easy in vbscript.

  • Put the custom action somewhere in the execute sequence (ideally as a deferred execution action, since you're making changes to the system).

  • Add an entry to the RemoveFile table, so the config file is removed on uninstall (assuming you don't want it to be left behind.)

  • Add an entry to the LaunchCondition table, to prevent users from doing a silent install. Or if you want silent install to be allowed, make the names of the public properties that hold the config data known, and make them part of the LaunchCondition. You would block "msiexec /i myapp.msi", but you could choose to allow "msiexec /i myapp.msi FOO=Something BAR=SomethingElse".

Ed
@Ed - You made an incorrect assumption. Basically, my customer is an enterprise and the end-user is the employee of that enterprise. The settings file are organization customizations to the behavior of the software. The end-user doesn't answer those types of questions. This method allows the enterprise to customize the software to their liking and deploy it without configuring things on each machine. Thanks for your reply though.
blak3r