How to: Change options in a Windows Installer package using Orca
In the last couple of weeks I created a windows service for my current assignment. In order to deploy this service I created an installer package which works fine. But the administrators at this company asked if I could set the default value for the "Install app for yourself, or for anyone who uses this computer" radio button group to anyone.
Of course, I said, silently laughing for being asked to do such a simple task. But boy, was I wrong!
The installer, like the windows service, was created using VS 2003. I tried looking for a property with which I could change the default value for that radio button group. And I couldn't. I tried Google and all I could find was that, unless I used VS 2005, I had to use an application called Orca to do this manually.
Set Everyone as default in installer
Suppose you want to have the "Everyone" option in the folder form of your installer to be the default. Then you would have to take the following steps to change this, once the MSI file has been created:
- Start Orca and open the MSI file you want to change.
- You will see two grids. The one on the left contains the tables in the MSI file, the one on the right the properties and values stored in that table.
- In the grid "Tables" look for the table Property and select that table.
- In the grid on the right, look for property FolderForm_AllUsers and select that property.
- Change the value to ALL.
- Save the installer and close Orca.
When you run the installer, you will see that the property is now set to "Everyone" instead of the "Just me" which is the regular default value.
Why is this not useful?
First of all, this works. And I could do this for my client. But why has Microsoft made this so difficult? I'm not the only one with this problem, and there are more options one might like to change. For example, you may wish to force a reboot after the installation has completed. Again something you need to do using Orca.
I'm forced to manually change this when I create a new installer. We're currently running tests on the application and for each fix we need to create a new installer. So you can image that I'm not too thrilled having to change this option by hand for each fix I need to deploy.
If there is anyone out there that has an better solution, please let me know. If it can be done by changing something in the VS 2003 installer project, that would be my first preference. If it can be done using a post-build action, again that would suit me just fine. I eagerly await any comments.