Software Application Packaging Overview
Software Application Packaging Overview
PACKAGING OVERVIEW
1|Page
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
o Marimba
3|Page
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* What is a MSI?
MSI is Microsoft Windows Installer. It is an installation, in the form of a single file. It is actually a database that contains several tables (80+). Each of these tables contains instructions and set-up information. In wise there are 120 (87+33) tables.
* Structure of MSI? o Products (Collection of Features) o Features (Collection of Components) o Components (Collection of files and Registries)
* What is Product?
Product is an Application.
* What is Feature?
Features are buckets for Components. Windows Installer configuration commands operate only on Features (installing, advertising, Uninstalling). Self-healing, install-ondemand and user profile fix-up operate at the Feature level.
4|Page
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* What is Component?
Components are collections of resources that are always installed or removed as a unit from a user's system. A resource can be a file, registry key, shortcut, or anything else that may be installed. Every component is assigned a unique component code GUID.
* What are Shortcuts & Types? Shortcuts are the entry points to the applications installed on the system which is normally points to a file. o Advertised (File should be Installed by the Application) o Non Advertised (File that is not part of Installation. It is also called Command Line shortcuts) * What are INI File & its format? INI files are plain-text files that contain configuration information. "INI" stands for initialization. [Section] Keyname=value * What are Services & its types? A windows service is a background process which is loaded by the Service Control Manager of the OS. o Win32 Service (Win32 services are the services which is running by the executable file installed by the Application). o System or Kernel Services (Kernel services are the services which are used by the OS 5|Page
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* Where is Service information stored? Most of the Service information is stored in the windows registry HKLM\System\CurrentControlSet\Name of the Service * In the MSI, which tables contain information about the service details? o ServiceInstall (Service Details) o ServiceControl (Controlling the service during Installation & UnInstallation)
* What is ODBC & DSN and its types? ODBC means Open Database Connectivity. The purpose of ODBC is to allow the user to access data from any application. The layer between the application and the DBMS called DSN. o System DSN (DSN will be available for all users) o User DSN (DSN will be available for that particular user)
* What is File Association? The Windows operating system recognizes file types and associates them with programs based on their file extension. A file that carries no extension or no associated program is called Orphaned.
* What is Environment Variable & its types? Environment Variables are the variables that are set by the Operating System & Application. o System Variable (Available for all users) o User Variable (Available for that particular user)
* What is Property & types of Properties, give some Examples? Properties are global variables that the Microsoft Windows Installer uses during an installation. o Private The installer can be use only internally (values cant be changed during the run time). # Manufacture, ProductCode, ProductID, ProductName, ProductVersion o Public The installer can be uses both internally & externally (values can be changed during 6|Page
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
the run time also). # INSTALLLEVEL, . o Restricted Public The user cant change the value both internally & externally due to security purposes. # ALLUSERS, REBOOT, REINSTALLMODE
* What is the Use of the following Properties? + ALLUSERS (Null, 1, 2) User - Per-user, Not valid, Per-user Admin - Per-user, Per-machine, Per-machine + REBOOT (Force, Suppress, ReallySuppress) Always prompt for a reboot at the end of the installation. Suppress prompts for a reboot at the end of the installation. But the user can still prompt by using ForceReboot action. Suppress all prompts for reboots during the installation. + REINSTALLMODE (to specify the type of reinstallation of the Application) p - If file is missing o - If file is missing or if an older version is installed. e - If file is missing or an equal or older version is installed. d - If file is missing or a different version is installed. c - If file is missing or the stored checksum doesn't match the calculated value. a - Force all files to be reinstalled. u - Rewrite all required user specific registry entries. m - Rewrite all required computer-specific registry entries. s - Overwrite all existing shortcuts. v - Run from source and re-cache the local package. Do not uses the v reinstall option for the first installation of an application or feature. + REINSTALL (List of features to be Installed)
7|Page
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* How to give Permission for files, folders & Registry keys in MSI?
In the MSI, we can give permissions through Lock Permission table.
* How to give Permission for files, folders & Registry keys through VB Script & what is the syntax? We can give permission for files & folders through VB Script by using the CACLS & XCACLS commands. CACLs should only run on NTFS partitions. CACLS Changes Access Control ListS Cacls [/T] [/E] [/C] [/G user: perm] [/R user [...]] [/P user: perm [...]] [/D user [...]] o /T Changes ACLs of specified files in the current directory and subdirectories o /E Edit ACL instead of replacing it o /C Continue (ignore) access denied errors o /G user : perm where access rights granted can be: R 8|Page
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
C F (read, change, full control) o /R user Revoke specified user's access rights (only valid with /E) o /P user: perm Replace specified user's access rights. Permission can be: N R C F (none, read, change, full control) o /D user Deny specified user access E.g. cacls c:\myfile.txt /E /G : F In VB Script the syntax as On Error Resume next Set Wshell = CreateObject (Wscript.Shell) Wshell.Run cacls c:\myfile.txt /E /G : F * How to disable ARP Details during the Installation through Command line, tell some ARP properties? msiexec /i ARPSYSTEMCOMPONENT=1 o ARPAUTHORIZEDCDFPREFIX o ARPCOMMENTS o ARPCONTACT o ARPINSTALLLOCATION o ARPNOMODIFY o ARPNOREMOVE o ARPNOREPAIR o ARPPRODUCTICON o ARPREADME o ARPSIZE o ARPSYSTEMCOMPONENT o ARPURLINFOABOUT o ARPURLUPDATEINFO
* What is SFC?
SFC means "System File Checker." It is a command-line utility that scans the operating system's files to ensure that they are the correct ones (original Microsoft files). But it can be run or scheduled manually only. During the process, it will scan all the protected files (.SYS, .DLL, .EXE, .TTF, .FON, and .OCX) to verify their versions. If the versions are not correct, it will replace the particular files from the back up folder called DLL Cache folder
9|Page
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* What is Advertisement?
It means that, the Availability of an application to users or others with out actually the full Installation. There are two types of Advertising o Assigning An Application appears (shortcuts, files & registries) to a user or others, when an Application is assigned. When the user tries to open, it is installed upon demand. o Publishing 10 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
No Entry points appear to a user or others, when an Application published to the group. It is activated only if the group Application activates the published Application i.e. Installation on Demand.
* What is Transform?
A transform is a windows installer file with the extension (.MST). It should be used along with a MSI to customize or change the installation package without modifying the MSI. The installer can only apply transforms during an installation.
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* How many Transform can be created for one Vendor MSI? Any Number
* How many Transforms can be supplied in the Command line? Any Number
Installation Actions
12 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* What are the types of Conditions in the Custom Actions and what is the use?
o Not Installed - During Installation only o REMOVE - During UnInstallation only o NOT REMOVE - During both Install & UnInstall
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
processed until the InstallExecute, InstallExecuteAgain, or InstallFinalize action is run. If the Current User have the elevated privileges (Custom actions make changes in the system directly), then it should run in Deferred Execution in System Context only.
* What is the difference between Immediate Execute / Deferred Execute in the Custom Actions?
o Immediate custom actions, can be sequenced anywhere within any of the sequence tables Deferred custom actions can only be sequenced between the InstallInitialize and InstallFinalize actions in execute sequence tables o Immediate custom actions have access to the Installation database Deferred custom actions doesnt have access to the Installation database o Immediate custom actions can only run in the User Context Deferred custom actions can run both in the context of the user and elevated using the system context.
* What is the difference between Deferred in System Context / Deferred in User Context in the Custom Actions?
If the Custom action which installs or modify a file under the INSTALLDIR or Installation should be run in Deferred in User Context If the Custom action which installs or modify the system file directly should be run in Deferred Execution in System Context
* What are the types of Processing Options in the Custom Actions and what is the use?
o Synchronous Windows Installer runs the custom action synchronously to the main installation. It waits for the custom action to complete successfully before continuing the main installation. o Synchronous, ignore exit code Windows Installer runs the custom action synchronously to the main installation. It waits for the custom action to complete before continuing the main installation; the action can be either success or fail. o Asynch, wait at end of sequence Windows Installer runs the custom action simultaneously with the main installation. At the end it waits for the exit code from the custom action before continuing.
14 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
o Asynch, no wait Windows Installer runs the custom action simultaneously with the main installation. It doesnt wait for completion of the custom action and doesnt check the exit code also.
* What are the types of Scheduling Options in the Custom Actions and what is the use?
o Always Execute This action execute in all sequences o Run first time This action execute only the first time Windows Installer encounters it. o Run once per process This action execute only one time either Execute sequence that should not run if the installation is running in silent mode. o Run only if UI sequence was run This action execute only if either Execute sequence is run following User Interface sequence.
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
Assembly files. When installing assemblies to the global assembly cache, the installer cannot use the same directory structure. Assemblies can exist only once in the assembly cache. Assemblies are added and removed from the assembly cache atomically
* What is the difference between Wise Package Studio & Install Shield Admin Studio?
Both tools are more or less same, but as per my knowledge for capturing part Install Shield is good, it wont capture unnecessary files & registry keys and for editing the MSI or .wsi or .ism, Wise is better because Wise GUI is good. I found lot of bug in Install Shield only O GUI PART O SHORTCUT ICON (OTHER THAN EXECUTABLE FILES) O DIRECTORY TABLE (INSTALLDIR) O CREATE UNNECESSARY ENTRIES WHILE EDITING THE MST O PRODUCT LANGUAGE PROPERTY WONT CHANGE IN THE MSI AFTER THE COMPILATION, DEFAULT 1033 O CREATE UNWANTED COMPONENT & CREATE FOLDER ENTRY WHILE EDITING ANY COMPONENT O COMPONENT NAMES O IT WONT VALIDATE THE MSI IF THAT MSI IS INSTALLED IN THE LOCAL SYSTEM
16 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
17 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* What is IntelliMirror?
IntelliMirror management technologies is a set of powerful features for change and configuration management. It ensures that users data, software, and personal settings are available when they move from one computer to another, and persist when their computers are connected to the network. Microsoft divides IntelliMirror's features into the following four categories: o User Data Management :. IntelliMirror supports the mirroring of user data to the network and local copies of selected network data. o Software Installation and Maintenance : IntelliMirror allows you to centrally manage software installation, repairs, updates, and removal. o User Settings Management : IntelliMirror allows you to centrally define computing environment settings for both users and workstations. o Remote Installation Services : IntelliMirror allows you to image workstations with the Windows 2000 Professional operating system
* What are the other tools which are used during the testing & solving the Issues in the Application?o Picture Taker
18 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
o Windows Install Master o Install rite o RegMon o FileMon o CsDiff o Icon Extractor & Icon Builder o RegExtractor o WiLogUtl o WiseComReg o ResourceW2K
* Which drive your Application will Install, C drive has less space and D drive has more space? Why & how to solve?
It will install D drive only due to Windows Installer features. We can solve by adding WindowsVolume entry in the directory table as parent of TARGETDIR
19 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* What is a Patch?
Patching is a streamlined process for updating earlier versions of a Windows Installer setup package i.e. when you update only files that already exist in your installation package. Only the package code is changed.
* What is Upgrade?
Upgrade is a process of updating the earlier versions of a Windows Installer setup package i.e. Adding, changing & deleting new Files & Registries. But here product code, product version & package code should be changed.
* What is ICE?
It means Internal Consistency Evaluation. ICEs are used to validate instal lation packages.
20 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* Give some ICE Error number and tell how to solve the ICE Errors?
There are totally 96 ICE Errors and 14 ICEM Errors in the Windows Installer. Some examples are as follows o ICE03 - Basic data and foreign key validation o ICE18 - Validates the KeyPath column of the Component table when it is NULL. o ICE21 - Validates that all components in the Component table map to a feature in the FeatureComponents table. o ICE33 - Checks for entries in the registry table that belong in other tables. o ICE38 - Validates that components installed under the user's profile use a registry key under HKCU as their key path. o ICE64 - Checks that new directories in the user profile are removed in roaming scenarios. o ICE57 - Validates that individual components do not mix per-machine and per-user data. o ICE59 - Checks that advertised shortcuts belong to components that are installed by the target feature of the shortcut. oICE81 oICE50
21 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
22 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
C:\Documents and Settings\Current User\ o [ProgramFilesFolder] C:\Program Files\ o [ProgramMenuFolder] C:\Documents and Settings\Current User\Start Menu\Programs\ o [RecentFolder] C:\Documents and Settings\Current User\Recent\ o [SendToFolder] C:\Documents and Settings\Current User\SendTo\ o [StartMenuFolder] C:\Documents and Settings\Current User\Start Menu\ o [StartupFolder] C:\Documents and Settings\Current User\Start Menu\Programs\Startup\ o [System16Folder] C:\Windows\System\ o [SystemFolder] C:\Windows\System32\ o [TempFolder] C:\Documents and Settings\Current User\Local Settings\Temp\ o [TemplateFolder] C:\Documents and Settings\Current User\Templates\ o [WindowsFolder] C:\Windows\ o [WindowsVolume] C:\
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
o ALLUSERSPROFILE C:\Documents and Settings\All Users o APPDATA C:\Documents and Settings\current User\Application Data o CommonProgramFiles C:\Program Files\Common Files o COMPUTERNAME System Name o ComSpec C:\Windows\system32\cmd.exe o HOMEDRIVE C: o HOMEPATH C:\Documents and Settings\Current User o ProgramFiles C:\Program Files o SystemDrive C: o SystemRoot C:\Windows o TEMP C:\Documents and Settings\USERNAME\Local Settings\Temp o USERNAME Current User o USERPROFILE C:\Documents and Settings\Current User 25 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
o Windir C:\Windows
* What is VB Script?
VB Script is a Microsoft Scripting language that means it is a lightweight programming language. It is a light version of Microsoft's programming language Visual Basic. It is used to add interaction for the web page projects.
26 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
* Tell some objects in the VB Script & when & why it is used in the Application?
o Class Object :- Provides access to the events of a created class o Dictionary Object :-Object that stores data key, item pairs o Err Object :-Contains information about run-time errors o FileSystemObject Object :-Provides access to a computer's file system o Match Object :-Provides access to the read-only properties of a regular expression match o Matches Collection :-Collection of regular expression Match objects o RegExp Object :-Provides simple regular expression support
* How to install only one particular feature during the Installation through Command line?
msiexec /i ADDLOCAL=
* Transforms
The installation process can be manipulated by applying transforms (.mst) to the installation database. A transform makes changes to elements of the database. For example, Windows Installer can use a transform file to change the language in the user interface of an application. The Windows Installer transform files modify the installation package file at installation time, and can therefore dynamically affect the installation behavior. Customization transforms, much like patches, remain cached on the computer. These transforms are applied to the base package file whenever Windows Installer needs to perform a configuration change to the installation package. Transforms are applied at initial installation; they cannot be applied to an already installed application.
Transforms
.mst file Secure, unsecure, embeded defualt -unsecure (can modify) secure -read only 27 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
This tool fully complies with Microsofts .MSI standards while also extending the capabilities of .MSI packages without making changes to their native format. The result is a powerful tool that can be used to deploy legacy, Web-based, and .NET applications quickly and easily. The Msiexec.exe program is a component of Windows Installer. This program uses a dynamic link library, Msi.dll, to read the package files (.msi), apply transforms (.mst), and incorporate command-line options. The installer performs all installation-related tasks: copying files onto the hard disk, making registry modifications, creating shortcuts on the desktop, and displaying dialog boxes to query user installation preferences when necessary. Each package (.msi) file contains a relational type database that stores all the instructions and data required to install (and uninstall) the program across many installation scenarios. For example, a package file could contain instructions for installing an application when a prior version of the application is already installed. The package file could also contain instructions for installing the software on a computer where that application has never been present. 28 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
The Installer is actually a relational database. This database consists of the Installer package (data1.msi). This package contains information such as the installation sequence, system dependencies, destination folder paths, setup properties, component to feature relationship, and overall installation options. This database is never actually changed or written to. Instead, it uses what is called a Transform file (.mst) to apply customizations that you desire, to transform the database from its default state. The Installer doesn't stop there. It also is used for post-installation features such as Detect and Repair, Add/Remove programs, Run From Network and Install on First Use options. It is also used to give Elevated Rights (which is not turned ON by default) to an application on Windows NT so the user doesn't have to be a member of the local NT Administrator group. Overall, the Installer technology creates a higher level of customization than has ever been attempted before. Windows Installer technologies are divided into two parts that work in combination: a client-side installer service (Msiexec.exe) and a package file (.msi file). Windows Installer uses the information contained within a package file to install the application.
The Windows Installer database (.msi file) consists of multiple interrelated tables that together compose a relational database of the information necessary to install a group of features. The following table describes the groups of related tables: Group Description Core table group Describes the fundamental features and components of the application& installer package. 29 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
File table group Contains the files associated with the installation package. Registry table group Contains the registry entries. System table group Tracks the tables and columns of the installation database. Locator table group Used to search the registry, installer configuration data, directory tree, or .ini files for the unique signature of a file. Program installation group Holds properties, bitmaps, shortcuts, and other elements needed for the application installation. Installation procedure group Manages the tasks performed during the installation by standard actions and custom actions.
THE FOLLOWING COMMAND-LINE SCRIPT WOULD ADVERTISE THE "SPORTS" FEATURE AND INSTALL THE "NEWS" FEATURE TO RUN FROM SOURCE. MSIEXEC /I EXAMPLE.MSI ADVERTISE=SPORTS ADDSOURCE=NEWS /QB Another important thing to remember is that feature names are case-sensitive.
What is a managed application? Ans: A managed application is an application where the system administrator exerts some level of control over the installation and
30 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
maintenance of the product. Managed applications are often used to deploy software to large numbers of users or machines. Managed applications are a way for system administrators to allow users to install authorized software in locked-down environments where users generally do not have the rights to install software. An application is considered managed if it is: Installed or advertised to a user by a member of the Administrators group. Installed or advertised per-machine by a member of the Administrators group. Assigned or published on Windows 2000 and later by an Administrator. Marked as managed by another software and deployment management system. the management system used, but generally requires an administrator's action.
An installation package cannot declare itself "managed." Whether or not an application is managed is controlled by the system administrator. Note that "managed" is different from "elevated." An elevated application is an application that can run with system privileges when installing. All managed applications are elevated, but applications can be elevated without being managed by means of the AlwaysInstallElevated policy. Due to its security implications, this policy is disabled by default and requires careful consideration before use.
What are the differences between a 'deferred' custom action and an 'immediate' custom action? Deferred custom actions can only be sequenced between the InstallInitialize and InstallFinalize actions in execute sequence tables. Immediate custom actions, on the other hand, can be sequenced anywhere within any of the sequence tables.
31 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
Deferred custom actions cannot access the installation database. In fact, deferred custom actions have very limited access to the installation session because an installation script can be executed outside of the installation session that created it. Immediate custom actions have access to the installation database and can read and set installation properties, modify feature and component states, and add temporary columns, rows, and tables among other things. While both deferred and immediate custom actions can run in the context of the user initiating the installation, only deferred custom actions can run elevated using the system context. Deferred custom actions are not executed immediately. Instead they are scheduled to run later during the execution script. The execution script isn't processed until the InstallExecute, InstallExecuteAgain, or InstallFinalize action is run.
When should I use a deferred custom action instead of an immediate custom action? Deferred custom actions should be used when the custom action must make a change to the system or call another system service. Additionally, only deferred custom actions can run in an elevated context. If your custom action requires elevated privileges in order to run, your custom action needs to be marked as deferred. Note: Custom actions marked to run in the system context (msidbCustomActionTypeInScript + msidbCustomActionTypeNoImpersonate) will only run in the system context if the installation itself is elevated. Additionally, when making a change to the system by means of a
32 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
custom action, you should also include a rollback custom action that can undo the change.
What are the differences between small, minor, and major updates? A small update is a product update that changes a few files or possibly adds some new content. A minor update is a product update that makes enough changes to warrant changing the product version for the product, whereas a major update is a product update with a large number of changes that warrants a change in the product code. This table summarizes what changes in each update and the possible distribution vehicles for each. It's sometimes easier to think of a small update as a "hotfix" or Quick Fix Engineering (QFE) update, a minor update as a service pack, and a major update as a product upgrade. Small and minor updates can be considered almost equal in that the only real difference is that a minor update has a change to the ProductVersion whereas a small update does not. The rules that they follow and application of the patch are the same. Application of small and minor update patches requires explicit reinstallations. Major updates are not subject to that limitation and a reinstallation is not required for patch application. Additionally small and minor update patches are limited in the changes that can be made to the featurecomponent structure for the package. Significant changes can be made to the feature-component structure in the scope of a major update.
33 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
Custom actions Custom actions are actions entirely defined by the user. They can be executable files, dynamic linked libraries, Visual Basic scripts or JavaScript files. They can be scheduled at any time during the installation. Basically, an installation process consists of two sequences: Installation User Interface Sequence and Installation Execute Sequence. In Advanced Installer, these sequences are located in the Custom Actions page, under the Project Details tree. In the User Interface Sequence only immediate custom actions can be used. It contains a list of Standard Actions starting with
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
Before File Installation Before Finalization In the "Before Initialization" category only immediate actions can be used. The sequence that starts with the InstallInitialize standard action and ends with InstallFinalize will be gone through twice. The first time the installer scans all the actions contained by the Execute Sequence and it creates the installation script used for the actual install. The second time, based on the installation script, the installer executes all the actions contained by the package only if their conditions were true when the script was built. For example, it will start/stop services, it will write/modify registries, create shortcuts and it will install the files on the target machine. When the installation script execution is done, the installer returns to the User Interface Sequence in order to display the exit dialog and/or execute any custom actions that may be placed after the ExecuteAction standard action. As mentioned above, there are four types of actions: immediate actions deferred actions rollback actions commit actions The immediate actions can be used anywhere in the Install UI Sequence and in the Execute Sequence, but for the second one there is a phase where immediate actions can no longer be used. That is when the installation script is triggered. The
35 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
immediate actions should not modify the target machine since those changes cannot be rolled back. The deferred actions, can run only during the installation script execution. The deferred actions should be the only ones that makes changes on the local machine. This is why each deferred action must have a rollback action so that the changes it makes can be undone if the setup fails or is canceled. The rollback actions are used when the application is installed, but something went wrong and the installation must be rolled back. While the installation script is executed, the installer builds a rollback script. After every standard action is executed, the installer adds a rollback command to the rollback script. The commit actions are the opposite of the rollback actions. The commit script is executed after the InstallFinalize standard action when everything ended successfully. Its purpose is to delete the backup files created by the rollback script. For each of the deferred, rollback and commit actions you have an additional option: With no impersonation. This is related to the current user's rights set by the User Account Control (only for Windows Vista or above) when running the package. A normal user can run a custom action that requires administrator rights only if the With no impersonation option is set for it.
36 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
Path Variables Define commonly used paths in a central location so that you do not need to change every source file's path each time you move the project or change the directory structure. In the previous example, if you keep all of your application's source files in various subfolders under C:\Work\Files, you could create one variable that points to the Files folder<MyFiles>. If you want to include a file that is in C:\Work\Files\Images, you enter <MyFiles>\Images. If you move your files to D:\Work\Files, you can go to one place, your variable <MyFiles>.
All path variables can be viewed and modified in the Path Variables explorer in the Path Variables view. You can use path variables in almost any location in InstallShield where you link to source files, such as in the Dialog Editor, dynamic file links, and the release location. Instead of entering the path variables yourself, you can have InstallShield recommend them whenever you browse to a path. Path variables are used during the development of your installation project. These paths do not apply to the target machines where the application is being installed. Rather, they are used to link to source files for your installation project. When the project is built, those links are evaluated and the files they point to will be built into the installation.
There are four types of path variables that you can use. Each type
37 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
functions somewhat differently from the others. Regardless of the path variable type you use, the variable name is provided in the same manner throughout InstallShield. Types of Path Variables Variable Type Predefined Path Variables Description Predefined path variables are path variables that point to some of the most commonly used folders. Unlike other types of path variables, these values cannot be edited in InstallShield.
See Registry The values of registry-based path variables are derived from the registry keys you created. After Path creating the registry key, you need to set a path variable to this key. Variables Environment path variables are based on the values Environment of your system's environment variables. You can set an environment path variable to an existing Variables environment variable. Standard, or user-defined, path variables are defined Standard through InstallShield. You can specify a path variable such as <MyFiles> with a value of C:\Work\Files. Path These variables do not rely on any outside sources, Variables such as the registry or system paths.
Standard Actions A Windows Installer installation is run as a sequence of events, called Standard Actions. In between
38 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
them, you can schedule your own Custom Actions. The standard actions used by Advanced Installer can be shown by using the "Show Standard Action" button on the toolbar of the "Custom Actions" page and they are: InstallUISequence Standard Action Description starts the UI sequence (when the dialogs are shown) "PrepareDlg" dialog is shown performs the searches in the Search page
Begin PrepareDlg AppSearch s LaunchConditions CCPSearch RMCCPSearch CostInitialize FileCost CostFinalize MigrateFeatureStat es WelcomeDlg ResumeDlg MaintenanceWelco
ends the disk space costing and resolves the folders in the these feature states in the new version. "WelcomDlg" dialog is shown "ResumeDlg" dialog is shown "MaintenanceWelcomeDlg" dialog is shown
39 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
IsolateComponents
for use by a specific application (typically an .exe). This iso on the computer
CostFinalize SetODBCFolders
ends the disk space costing and resolves the folders in the
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
MigrateFeatureStat during an upgrade it reads the feature states in the old ve es InstallValidate RemoveExistingPro ducts
Before File Installation Standard Action Description these feature states in the new version verifies that all volumes to which cost has been attributed or removed are currently in use by an active process upgrades an older version of the package if one is found
marks the beginning of the sequence of actions which c registry. clients uninstall removes components during an uninstall the system registry. Runs only during an uninstall
UnpublishComponent removes information about components published by t s UnpublishFeatures StopServices DeleteServices UnregisterComPlus SelfUnregModules
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
during an uninstall
removes the ODBC data sources, translators and drivers uninstall only during an uninstall uninstall only during an uninstall registry. Runs only during an uninstall manages the unregistration of OLE ProgId information only during an uninstall during an uninstall during an uninstall an uninstall page. Runs only during an uninstall uninstall removes the files created in the Files and Folders page.
42 | P a g e
UnregisterExtensionInf manages the removal of extension-related information o UnregisterProgIdInfo UnregisterMIMEInfo RemoveINIValues RemoveShortcuts
RemoveEnvironmentS modifies or removes the environment variables created trings RemoveDuplicateFiles RemoveFiles
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
uninstall
removes the folders created in the Files and Folders pag uninstall moves or copies files which use File Move operations
Description installs the files specified in the Files and Folders page duplicates the files which use File Duplication operations is not used by packages created with Advanced Installer
InstallFiles PatchFiles DuplicateFiles BindImage CreateShortcuts RegisterClassInfo RegisterExtensionI nfo RegisterProgIdInfo RegisterMIMEInfo WriteRegistryValue s WriteINIValues WriteEnvironmentS trings RegisterFonts InstallODBC
manages the registration of COM class information with th manages the registration of extension related information
registers MIME-related registry information with the system creates the registry values specified in the Registry page
creates or modifies the environment variables created in th registers fonts marked for registration installs ODBC drivers, translators and data sources
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
creates users and groups specified in the Users and Group Programs. Also, it caches the MSI package manages components which need to be published publishes the assemblies installed by the package writes each feature's state into the system registry
manages the advertisement of the product information wit is being installed or reinstalled manages the elements created in the IIS page Also, it marks the end of the Execute sequence
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
+ /I - Installs a product + /j - Advertise a product u - Advertises to the current user m - Advertises to all users of machine g - Language identifier t - Applies transform to advertised package + /a - Administrative Installation + /x - UnInstalls a product o Display Options (during Installation & UnInstallation) + /quiet - no user interaction + /passive - unattended mode + /q - sets user interface level n - No UI n+ - No UI except for a modal dialog at the end r - Reduced UI with no modal dialog at the end b - Basic UI b! - Basic UI with hide cancel button b+ - Basic UI with a modal dialog at the end b+! Basic UI with a modal dialog at the end & hide cancel button b- - Basic UI with no modal dialog at the end b-! - Basic UI with no modal dialog at the end & hide cancel button f - Full UI + /help - help information o Restart Options + /norestart - Do not restart after the Installation + /promptrestart - Prompts the user for restart if necessary + /forcerestart - Always restart the computer after Installation o Logging Options (Writes logging information into a logfile at the specified existing path. Default is 'iwearmo') + /l - I - Status messages w - Nonfatal warnings e - All error messages a - Start up of actions r - Action-specific records u - User requests c - Initial UI parameters m - Out-of-memory or fatal exit information o - Out-of-disk-space messages p - Terminal properties v - Verbose output x - Extra debugging information + - Append to existing log file ! - Flush each line to the log * - Log all information, except for v and x options + / log Equivalent of /l* 45 | P a g e
Insert Company Logo Here <Insert Company Name Here> Packaging overview Rev. 1.01 Author: David Wood
o Update Options + /update + /uninstall + /p - Applies a Patch o Repair Options (Repairs a product) + /f p - only if file is missing o - If file is missing or an older version is installed (default) e - If file is missing or an equal or older version is installed d - If file is missing or a different version is installed c - If file is missing or checksum does not match the calculated value a - forces all files to be reinstalled u - All required user-specific registry entries (default) m - All required computer-specific registry entries (default) s - All existing shortcuts (default) v - Runs from source and reaches local package o Others + /m Generates an SMS status .mif file + /? Or /h Displays the copy rights for Windows Installer + /y Calls the system function DllRegisterServer to self-register modules passed in on the command line. + /z Calls the system function DllUnRegisterServer to Unregister modules passed in on the command line. + /c Advertises a new instance of the product + /n Specifies the particular instance of the product
46 | P a g e