packaging in windows
TRANSCRIPT
-
8/3/2019 Packaging in Windows
1/3
Windows application packaging - Guidelines
What should not be repackaged
y Pre-existing vendor MSIsy Operating Systemsy Operating System Service Packs and Hotfixesy Internet Explorery Windows Media Playery Windows Installer Servicey Driver Installers (or any package that is hardware dependant) - you can do it, but it
is usually more painful than it's worth, and the benefit is generally negligable.
NOTE:OS protected files cannot be updated by an MSI
Package Build Client setupUse a clean machine to repackage your applications
To ensure a successful capture and valid package creation a clean PC is required to be
used to packaging/repackaging. What this means is that the PC should only contain the
following components :
y Base OSy All available service packsy All available hotfixesy The latest versions of .NET Framework, MDAC, IE, Media Player, Sun JavaREy NO additional applicationsExit all applications, stop unnecessary services
Close all other applications and stop any unnecessary services to minimise changes to
your system while packaging/repackaging. This includes :
y Antivirus/Antispyware software (including the Windows Defender application)y Firewall software (including the Windows Firewall)y Network adapter software (driver helpers such as Intel ProSet tools, or Sierra
Wireless T3G apps, etc)
y Virtualisation / emulation services (VMware Workstation, Daemontools, etc)y Unecessary services (Windows Update, IIS, SQL, Indexing Service, etc)y Set a static IP (DHCP updates the registry :P)You can use AutoRuns (by SysInternals and available through Microsoft) to check what
programs or services are starting automatically on your system.
-
8/3/2019 Packaging in Windows
2/3
Black Viper's website has handy guides to what services really need to be running on a
Windows XPPC and Windows Vista PC.
Defrag and Optimise
y Delete temporary filesy Configure static pagefiley A lightweight registry cleaner / defrag tool (Eusing Free Registry Cleaner / Auslogics
Registry Defrag)
y A lightweight disk defrag tool (Auslogics Disk Defrag)VMware Snapshots
Take a snapshot of your Package Build Client (you did install to a VMware Virtual
Machine, didn't you???)
Golden Rules
1. If its an MSI, then apply a transform2. If its an InstallShield or Wise Package, then capture and repackage3. If its a legacy application, then
1.Can you script and silently install the application, if not then2.Can you capture and repackage the application, if not then3.Can you wrap the application into an MSI, if not then4.Contact the vendor for an updated install
Repackage from a network location
Run your repackaging tool remotely from a mapped drive or UNC path. This ensures that
files or configuration from the repackaging tools will not be included in your package. If
possible have the output of your capture/repackaging directed to a network location.
Ensure your packages are clean
Review each package after creation and check for the following:
y Merge Module components (MDAC is an example of this, any MDAC componentsshould be deployed in an MDAC package not your application packages)
y Legacy uninstall referencesy HKCU keys (often unnecessary, see below)y Temporary filesy User-specific files or informationy Files managed by Windows File Protection
-
8/3/2019 Packaging in Windows
3/3
If possible get someone else to also check the package is clean before promoting to
production. Alot of packaging tools also include validation tools, just remember to test
before and after running any validation tool.
Reboot following installation
Always reboot your system after the installation has completed (if you are not
prompted), don't worry SetupCapture will restart. Often vendors will but runonce keys to
preconfigure settings or register dll or replace a file that is in use. A reboot is good
practice to ensure you capture all the changes made by the application.
Launch the application
Sometimes applications may perform operations on first launch that you will want in
your package. These information could include:
y Accepting a license agreementy Providing a serial numbery Registering the applicationy Creating the default configurationYou need to capture this information so that you can smoothly deploy the package in
your environment.
Remove unnecessary user files / values
To prevent Windows Installer triggering a repair ensure you remove unnecessary files
and values such as :
y HKCU valuesy User profile filesy Temporary filesy Unnecessary filesIf you do want to include HKCU values, place them in a separate feature to minimise
Windows Installer repair time experienced by users. Also note that a reinstallation of the
application package could overwrite HKCU keys with the package defaults instead of the
user customised settings.