- Configuration Items in Configuration Manager (SCCM, MECM) - Mon, Aug 22 2022
- Create and read SCVMM custom properties with PowerShell and the VMM Console - Mon, Apr 18 2022
- Prevent ransomware attacks on network shares with File Server Resource Manager (FSRM) - Mon, Mar 7 2022
Customizing MSI packages has gotten much easier over the years with the help of vendor-provided packaging and deployment guides. But many of these guides leave out how to disable features and settings that would be useful to systems administrators, such as disabling automatic updates and cleaning up shortcuts. In this guide, I am going to go over the process of customizing MSI packages using Orca.
Installing the Orca MSI editor
First, download the Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1. You will need Microsoft .NET Framework 3.5 installed as a prerequisite. Run through the installer, and on the Installation Options page, uncheck everything except the Windows Development Tools (it will automatically install the subcomponents too).
When the installation finishes, it places the installer for Orca under C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin. Run the installer and choose the Complete option. Orca should now be installed and accessible from both the Start menu and the right-click menu for MSI files.
Customizing an MSI package
For this guide, I am going to customize Cisco WebEx Recorder and Player. Right-click the downloaded MSI package and select the Edit with Orca option. This will open the MSI package in Orca for editing. For this guide, we are going to edit the MSI package to achieve the following:
- Place the application shortcut in its own Start menu folder
- Do not create an application shortcut on the desktop
- Disable automatic and manual updates
Before you start editing the MSI file, you need to create a transform to apply during the installation. Per best practice guidelines, you should never edit an MSI package directly. Instead, generate a transform that will apply the customizations to avoid a broken installation. Navigate to the menu bar and go to Transform > New Transform.
A "()" will appear next to the name of the MSI package in the window title bar to show it has generated a transform. Looking at the Tables navigation pane, you will notice there are several options.
With most MSI packages, you are only going want to focus on the following: CheckBox, Directory, Launch Condition, Property, and Shortcut. CheckBox controls the settings checked by default when running the installer both attended and unattended.
Directory controls the settings that define all the directories the installer uses. Launch Condition controls the conditions or prerequisites needed before the installer can run. Property controls application options during and after installation. Application vendors will often publish guides that list supported properties you can modify through the command line. Shortcut controls where the installation creates shortcuts.
Navigate to the Tables column and select the CheckBox table. Set the properties ISCHECKFORPRODUCTUPDATES, LAUNCHPROGRAM, and LAUNCHREADME to 0. Note that 0 = No and 1 = Yes.
While still in the Tables column, select the Directory table. You will notice there are quite a few directories. Fortunately, you don't need to worry about any of them as you will be creating your own. Go to the menu bar and select Tables > Add Row, and then add the following to each field:
- Directory: WebExStartMenu
- Directory_Parent: ProgramMenuFolder
- DefaultDir: Cisco WebEx Utilities
Directory refers to the name of the directory row you added; you will use this later when customizing shortcuts. Directory_Parent refers to the root directory where it will add your directory, which in this case is the %PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs directory. DefaultDir refers to the actual name of the directory you would like to create, which in this case is Cisco WebEx Utilities.
While still in the Tables column, select the Property table. Set the properties listed below to the following values:
- AgreeToLicense = Yes
- ISCHECKFORPRODUCTUPDATES = 0
- RebootYesNo = No
By setting these values, you are suppressing any first-run EULAs, disabling the application from checking for updates after installing, and preventing the application from telling Windows it needs to restart.
Finally, while still in the Tables column, select the Shortcut table. Right-click the two rows that have DesktopFolder as the directory and select the Drop Row option. This will prevent the installation from generating desktop shortcuts.
For the remaining two rows, replace the newfolder1 directory with WebExStartMenu (the name of directory we added earlier).
With all the customizations specified, it is time to save the transform file. In the menu bar, go to Transform > Generate Transform. Save the transform as something memorable and short, such as WebEx_Custom.mst.
Now it is time to install the application using the generated transform. Open a command prompt as an administrator and cd to the directory where your MSI and transform are located. Enter the following command:
msiexec.exe /i “atrecply.msi” /qb /norestart /L*v C:\Cisco_WebEx_Utilties.log TRANSFORMS=WebEx_Custom.mst
When the installation finishes, you should notice there are no desktop shortcuts, and that it has created the application Start menu shortcuts in the Cisco WebEx Utilities folder.
Although there are numerous MSI packages with different properties, shortcuts, and directories, the customization process is essentially the same. The benefit of using Orca to generate transforms is that it eliminates the need for lengthy batch scripts that perform actions such as deleting shortcuts and editing the Windows Registry to disable settings post-installation.