Creating Windows Installer Packages
The last method of deploying registry settings is creating Windows Installer package files. You've undoubtedly encountered package files by now. Microsoft Office 2000, Office XP, and Office 2003 Editions all ship as package files, which are databases of files and settings that Windows Installer installs on the computer. Creating a package file for a large application is an intense process, but creating package files that contain registry settings is straightforward.
To create a package file, you need an editor. One of the most popular package editors is VERITAS WinINSTALL, and you can learn more about this enterprise-class tool at www.veritas.com. If you don't want to spend the money necessary to purchase a full version of WinINSTALL, you can get a free version if you still have your Windows 2000 Professional CD lying around. Look in the Valueadd\3rdparty\Mgmt\Winstle folder. This is an older, limited-edition version of WinINSTALL. It's clunky and short on features when compared to recent versions of WinINSTALL, but it's suitable for creating package files to deploy registry settings. Install the program by double-clicking Swiadmle.msi. This installs WinINSTALL and adds a program group to the Start menu. Click Start, All Programs, VERITAS Software, VERITAS Software Console to run it.
Package files contain features, and features contain components. To deploy registry settings in a package file, you must create all of the above. Follow these steps to create a new package file and to add registry settings to it:
In the left pane of Veritas Software Console, right-click Windows Installer Package Editor, and then click New. In the Filename box, type the path and name of the package file, and then click OK.
In the left pane, right-click the package file that you created, and then click Add Feature. In the Name box in the right pane, type a new name for the feature.
The name is likely to be the only feature that you add to the package file, because all you're doing is deploying registry settings. You can create multiple features, though, and each feature can contain different registry settings. That way, users can choose whether or not to install individual features.
In the left pane, right-click the feature that you created in step 1, and then click Add Component.
The package editor automatically gives the component a GUID. Components typically contain all the files and settings required to implement a program unit, so applications often have multiple components. When using a package file to deploy settings, creating multiple components doesn't make a lot of sense.
In the left pane, select the component you added, and click Registry.
In the right pane, right-click the root key that you want to edit, and click New Key. Continue creating subkeys by right-clicking a key and clicking New Key until you've created the full path of the key that you want to edit.
In the right pane, click the key in which you want to add or change a value, and then click New Value. In the Value Name box, type the name of the value. In the Data Type list, select the value's type, and click OK. In the Type Editor dialog box, type the value's data, and then click OK.
Click File, Save to save your package file.
After you've created a package file, you can deploy it as you would deploy any other package file. For example, users can simply double-click the package file to install it. If the package file contains settings that users don't have permission to change, you can deploy it through Active Directory and Group Policy, which installs package files with elevated privileges. You can also execute the command that installs a package file, which is msiexec.exe" /i filename.msi.