Application Package Introduction: Application Packaging Application Repackaging
Application Package Introduction: Application Packaging Application Repackaging
Benefits:
Methods of repackaging:
Setup capture
MSI extraction
Copy paste method
ISS recording
1. Windows Installer:
The Windows Installer (previously known as Microsoft Installer) is a software
component or OS service/engine used for the installation, maintenance, and removal of
software on modern Microsoft Windows systems.
Advantages:
Advertising
Installation on Demand
Source Resiliency
Repair (Self-healing)
Rollback (Transactional operations) - State management
Managed Shared Resources (spell checker)
Installation in locked-down environments.
1
Windows installer versions:
2. Introduction of tools:
Packaging Tools:
Deployment tools:
Install rite
Process monitor
Orca
Wise com capture
Trace32 (Sms log file viewer)
2
Types of Setup Captures in Wise / Install shield:
Virtual Capture: Creates a clean virtual OS on your computer, and the installation is
redirected in the clean virtual OS.
Smart Monitor: Watches the installation and records the changes the installation performs.
Snapshot: Scan the computer before and after the installation and record the differences
between the first scan and the second.
Install Shield:
Installation Monitor : Repackager watches lower-level system activities and records related
changes made to the system by the setup(s) programs
Snapshot: Scan the computer before and after the installation and record the differences
between the first scan and the second.
Both tools are more or less same, but for capturing part Install Shield is good, it won’t
capture unnecessary files & registry keys and for editing the MSI or .wsi or .ism, Wise is better
because Wise GUI is good.
3. Introduction of MSI:
Structure of MSI:
3
Components (Collection of resources that can be files, Registries and single part of
the application.)
Key path: a resource in the component which is used to identify whether the
component installed or not in the machine.
Component rules:
Acquisition:
The Installer first installs the feature and then progresses through the
actions specified in the sequence tables of the installation database.
These actions query the installation database and generate a script
that gives a step-by-step procedure for performing the installation.
Execution
The installer passes the information to a process with elevated
privileges and runs the script.
Rollback
If an installation is unsuccessful, the installer restores the original
state of the computer. When the installer processes the installation
script, it simultaneously generates a rollback script. In addition to the
rollback script, the installer saves a copy of every file it deletes during
the installation. These files are kept in a hidden, system directory.
Once the installation is complete, the rollback script and the saved files
are deleted.
4
Windows Installer uses a client-server model for performing installations. Additionally for
security reasons, Windows Installer hosts DLL and script custom actions in a "sandbox"
process. Depending on how the install was initiated, one of the MSIExec processes can be the
client process (Current User). Another MSIExec process is Windows Installer service (System).
Install Options
/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 - Uninstall a product
Restart Options
Logging Options (Writes logging information into a log file at the specified existing path.
5
/l - I - Status messages
w - Nonfatal warnings
e - All error messages
a - Startup 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
Update Options
/update
/uninstall
/p - Applies a Patch
/f -
p - Only if file is missing 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
Others
6
/z <module> Calls the system functionDllUnRegisterServer to
Unregister modules passed in on the command line
5. Install Editor:
Product Definition:
o General Information,
o Add/remove programs,
o Product details,
o Features.
Features Details:
o Merge Module
o Files
o Registries
o INI files
o Shortcuts
o Environment Variable
o File Associations
o Services
o ODBC
Other Options:
o Administrative options
o Media
o Upgrades
6. Custom Actions
Basics and Directions
Custom actions play a very prominent role in getting the Developer's task
done easily. The Microsoft Windows Installer provides many built-in custom actions for
performing the installation process. The standard actions can also be defined as a part of the
packaging template.
7
the developer writes an action to execute his own installation. This is basically written to
achieve few tasks which are not possible through the MSI.
Best example would be to write a CA which gives permissions to registry keys using
"setacl.exe". Calling a system exe "RefreshPolicies" which would refresh the user permissions
and policies after the installation is complete. (This CA will be used only when we set
permission to registry or file for the user.)
Example Scenario: To call special functions during an installation those are defined in a
dynamic-link library (DLL). This type of CA can be used when we have a system dll or an
application dll to be invoked for our desired result.
Best example: In driver packages, where we need to customize the package in such a way that
it should check for the max XX value that is present in the machine and install the PNF or INF
file. If the file oem14.INF is the max XX value that is present in the machine, while installing the
package it should install the INF as oem15.INF resulting in the unique name for the INF file for
that machine. For this purpose we write a custom action using setupapi.dll.
8
Example Scenario: This type of CA is written to Use functions written in the development
languages Microsoft Visual Basic Scripting Edition, Wise Script or Microsoft JScript literal script
text during an installation. This type of CA can be used by writing a script as an embedded code
or as a script file which would reside in the source directory.
Best example: Handling excel addins, deleting a run time folder which remains back after un-
installation., creating a folder in network share etc.
Post Data to HTTP Server -post information to your Web server during an Installation
Sequences:
Normal User Interface - execute the custom action only when the application Installs in the
user interface
Normal Execute Immediate / Deferred - execute the custom action only when the
application Installs in the silent mode
Administrative User Interface - execute the custom action only when the application
Installs in "/A" mode with the user interface
Administrative Execute Immediate / Deferred - execute the custom action only when the
application installs in "/A" with silent mode
9
Advertisement Execute Immediate / Deferred - execute the custom action only when the
application installs in "/ju or /jm" mode.
Conditions:
Run when being uninstalled from command line or add / remove menu.
REMOVE~="All" OR MaintenanceMode="Remove"
Scripting options
Immediate Execution: Immediate custom actions, can be sequenced anywhere within any of
the sequence tables. It has access to the installation database (read & set installation
properties, modify feature & component states, add temporary columns, rows, and tables).
Deferred Execution - User Context
deferred custom actions can only be sequenced between the InstallInitialize and InstallFinalize
actions in execute sequence tables. It doesn't have access to the installation database.
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.
If the Current User doesn't have the elevated privileges (Permission to make changes in the
system directly), the custom actions should run in Deferred Execution in User Context only.
Rollback only
This Action should be executed during the Installation of the Rollback script or if the
Installation is Unsuccessful
Commit only
This Action should be executed during the Installation of the Commit script.
Deferred custom actions can only be sequenced between the InstallInitialize and InstallFinalize
actions in execute sequence tables. It doesn't have access to the installation database.
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.
10
If the Current User has the elevated privileges (Permission to make changes in the system
directly), then it should run in Deferred Execution in System Context only.
Processing Options:
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.
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.
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.
Asynch, no wait
Windows Installer runs the custom action simultaneously with the main installation. It doesn't
wait for completion of the custom action and doesn't check the exit code also.
Scheduling Options:
Immediate
Custom actions, can be sequenced anywhere within any of the sequence tables
Custom actions have access to the Installation database
Custom actions can only run in the User Context
Custom actions should never modify the system state. i.e. should not run in elevated context
Deferred
Custom actions can be sequenced only between the InstallInitialize and InstallFinalize actions
in the sequence tables
Custom actions doesn't have access to the Installation database
Custom actions can run both in the context of the user and elevated using the system context.
Custom actions can modify the system state.i.e can be run in elevated context
11
User Context: Custom action which installs or modify a file under the INSTALLDIR
System Context: Custom action which installs or modifies the file under INSTALLDIR or System
folder directly.
7. Setup Editor:
o Dialogs
o Tables
o Properties
o Tables
o Launch conditions
o Important checks.
o Components
8. Topics
Properties: Properties are global variables, Microsoft Windows Installer use these during
an installation.
Types: 1. Private. 2. Public. 3. Restricted Public.
o Private Properties: The installer can be use only internally (values can’t be changed
during the run time).
Ex: Manufacture, ProductCode, ProductID, ProductName, ProductVersion
o Public Properties:
The installer can be uses both internally & externally (values can be changed during the
run time also). Ex: INSTALLLEVEL INSTALLDIR ADDLOCAL
o Restricted Public Properties:
The user can’t change the value both internally & externally due to security purposes.
Shortcuts and types: Shortcuts are the entry points to the applications installed on
the system which is normally points to a file.
12
Types: 1. Advertised (Windows Installer) Shortcuts
2. Non-advertised (Standard) Shortcuts
A non-advertised shortcut (Standard Shortcuts) is a standard windows shortcut.
If you right-click it you will see the target field points to the executable that will be
launched. If, for whatever reason, this executable is missing the application will simply
fail.
An advertised shortcut (Windows Installer Shortcuts) is a technology specific to
Windows Installer. If you right-click an advertised shortcut the target field will be
grayed out. An advertised shortcut supports advertisement and repair. Repair means
that if the executable to which the shortcut is pointing is not there then windows
installer will repair the application and replace the missing file.
Types:
Note: If a Feature or Component is advertised, only the interfaces required for loading
and launching the application are installed to the user or others. If a user activates an
advertised interface the installer then proceeds to install the necessary Components &
Features.
Source Resiliency:
Applications that rely on network resources for installation-on-demand are susceptible to
source failures if the source location should change for any reason.
When: source resiliency will occur in two times
1. Maintenance installation
2. Installation on demand
Note: Normally the windows installer will check in three places Network Media URLS.
13
What happens when a file in the package already exists on the target PC? In the old days it
was whatever the author of the setup.exe felt like and that created what is known as “DLL
HELL”.
MSI has rules for this:
Highest version wins Most files (EXE, DLL, etc.) have version numbers inside (Right-click->
Properties ->Version tab to see them). If a file that exists in both the package and on the
target PC, the file with the highest version number will be copied (or left) on the machine. This
is Regardless of the file date.
Version wins over no-version
If one of the files doesn’t have version number then the file with the version number will be
Copied (or left) on the machine.
Files with no version number is user data
If the file already exists on the PC it is NOT overwritten. That means if the packaged file does
not have version then it won’t overwrite to the machine file.
Files: There are four common reasons for why files may not be removed during Uninstallation
•The components to which these files belong are marked as permanent. (This is done
through the Attributes column of the Component table.)
•None of the components to which these files belong have component GUIDs. (The
value for the component in the ComponentId column of the Component table is NULL).
Components without GUIDs are not managed by WindowS Installer.
• If the keypath of the component has a shared DLL refcount, then the component will
not be uninstalled.
•If the component is installed in the system folder and at the time of Uninstallation
there is an external shared DLL refcount for any one file in the component, then the
component will not be uninstalled.
The Registry table contains entries marked with the '+' sign. This directs the installer to
leave behind those registry keys during uninstallation.
In the InstallExecuteSequence table, the RemoveRegistryValues action is sequenced
after the UnregisterProgIdInfo and UnregisterMIMEInfo actions. The sequence of these
actions needs to be reversed. The presence of some registry values written from the
Registry table prevents certain ProgId, extension, and CLSID keys from being removed.
14
Services: A windows service is a background process which is loaded by the Service
Control Manager of the OS. Types: 1. Win32 Service. 2. System or Kernel Services
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
to communicate to the hardware devices).
Storage in tables:
Reboot:
Windows Installer may prompt for a reboot if it installs over a file that is in use or the package
explicitly requests that the installer reboot. It is easy to determine if Windows Installer
prompts for a reboot because it installed over a file that is in use. The first step is to generate
a verbose log file. In the verbose log file, look for the presence of the ReplacedInUseFiles
property in the property dump. If this property is present with a value of 1, then the Installer
will require a reboot because it overwrote an in-use file.
To determine which file was in-use, scan the log file for "Info 1603" and "Info 1903"
messages. The 1603 message will be logged by the Install Validate action.
Logging:
Logging can be enabled in the following four ways:
15
o Command-line:
If installing an MSI package from the command-line, the /L switch can be used to enable
logging. For example, the following command installs Package.msi and outputs verbose
logging to c:\Package.log:
msiexec /i Package.msi /l*v c:\package.log
o Windows Registry:
The following registry value can be used to enable verbose logging:
Key: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
Value Name: Logging
Type: REG_SZ
Data: voicewarmup
The resulting log is named MSI###.log (where "###" is a unique random identifier) and is
placed in the system's Temp directory.
o Group Policy:
The following Group Policy setting can be used to manage logging on multiple systems:
ComputerConfiguration -> Administrative Templates -> Windows Components ->
Windows Installer -> Logging.
Value Meaning
0 Action not executed
1 Success
2 User canceled
3 Fatal error
4 Suspended, waiting for reboot
If there is a problem still with advertising a package then check the property ProductState in
the log file.
Transforms
Definition: 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.
Types:
Embedded transform: Embedded transforms are stored inside the .msi file of the package.
Secured transform:
16
Secured transforms are stored locally on the user's computer in a location where, on a secure
file system, the user does not have write access. Such transforms are cached in this location
during the installation or advertisement of the package. During subsequent installation-on-
demand or maintenance installations of the package, the installer uses the cached transforms.
Unsecured transform:
Transforms that have not been secured are called unsecured transforms. To apply an
unsecured transform, pass the transform file names in theTRANSFORMS property orcommand
line string during the installation.
Value Priority:
If t2.mst contains any property or any update that t1 has made, the installation will take the
final transforms value.
Important Table:
Normal user: It is a user account that normally does not contain write/execute permissions
on files folders registries and only holds the read access.
Note:If the user having the privileges of MSI features (Windows Installer) is called as
Elevated User.
You can create through “gpedit.msc” in the run Command or registry keys
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer
17
Type: DWORD Key: AlwaysInstallElevated Value: 1
Locked down Environment: This policy can be used to block malicious scripts, help
lockdown a computer, or prevent unwanted applications from running.
Upgrade Code: It is a GUID that helps to uninstall the previous version of the application.
Upgrades
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.
TYPES:
Small Update: A small update is a product update that changes a few files or possibly
adds some new content. But there is a limitation for the changes that can be made to
the feature-component structure for the package. Only the package code is changed.
It is also called as a "Hotfix" or “Quick Fix Engineering (QFE)”.
Minor Upgrade: A minor update is a product update that makes enough changes. But
there is a limitation for the changes that can be made to the feature-component
structure for the package. The package code & product version is changed for the
product. It is also called as a “Service Pack”.
Major Upgrade: A major update is a product update with a large number of changes.
There is no limitation for the changes that can be made to the feature-component
structure for the package. The package code, product code & product version is
changed for the product. It is also called as a "Product Upgrade”.
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.
18
Running a Patch:
msiexec /p or update patchfile.msp REINSTALL=ALL REINSTALLMODE=omus
But if you do not give the command line options of REINSTALL and REINSTALLMODE
then it will not patch the existing installation package. What it will do is update the locally
cached copy of the MSI database.
If you run the MSP in UI mode then it will patch the installation and will also update
the locally cached copy of the installation, because when the dialogs are run they in turn set
REINSTALL and REINSTALLMODE.
Merge module:
Definition: Merge modules are a mechanism in Windows Installer that allows companies to
prepackage and share standard component definitions. Merge modules are used to deliver
shared code, files, resources, registry entries and setup logic to applications as a single
compound file.
Background mechanism:
Merge Module is working by checking the version, size & date of the file. If the file is Dll or
OCX, it will check the version, other files like text file it will check the Size & Date. It works by
the Mechanism of Shared Dll’s Count Concept which is stored in the Registry information
“HKLM\Software\Microsoft\Windows\Current Version\SharedDlls\”
Concept of isolation
Windows supports the use of shared libraries, usually DLLs and OCXs, to reduce
memory and disk-space requirements for applications, and to help developers with modular
application development. However, when many applications are installed on a system, using
shared libraries can lead to application instability. Common problems include the following:
19
Newer versions of a library may not be backward compatible with earlier versions.
Similarly, older versions of libraries may contain bugs that applications have worked
around; when a newer version is released, the workaround fails.
Poorly written legacy installers can overwrite a newer version of a library with an older
version.
Poorly written Uninstallers can uninstall libraries required by an application that remain on
the system. These and other problems are commonly called DLLHELL.
Windows Installer minimizes some of these problems. MSI enforces strict file-
Overwrite rules, so a newer version of file will not be overwritten by an older one. Its self-
repair features can lessen the effects of an uninstaller removing a file still required by another
application.
The two types of manifests used in Win32 assemblies are application manifests and assembly
manifests. An application manifest contains an application's name and version information,
and the names and COM information for its dependent libraries (An application manifest file
should be named AppName.exe.manifest.) The other type of manifest, an assembly, is a
manifest for a DLL or OCX file, containing the library's file name, version, and COM
information. Every manifest contains an assembly identity. An assembly identity is a name of
the form OrganizationName.DivisionName.AssemblyName. Unlike application manifest, which
are named after an executable, assembly manifests are named after the assembly identity
with the extension ".manifest" appended, as in:
OurCompany.AppMigration.AssemblyName1.manifest
Software management
Software Manager lets you import packages and their resources into the Software
Manager database, which provide a centralized point for managing all applications at any stage
20
of deployment. Once a package is in the Software Manager database, you can view its
resources, either on-screen or by running any of the predefined Software Manager reports.
From Software Manager, you set the package's status, which determines whether the package is
still in development, available for deployment, or retired. Finally, when a package is available for
deployment, you can use the Package Distribution tool from within Software Manager to
distribute the package to end users through a distribution system.
Conflict management: Use Conflict Manager to detect and resolve software conflicts
before you deploy packages across your organization's workstations. Conflicts occur when two
or more applications install the same system resource, such as files (including .DLLs, .VBXs,
and .OCXs), the Windows registry, and other items.
Validation ICE
In Wise Package Studio, by using “Package Validation” option by selecting the MSI with the
default Cub file or Browse your own Cub file.
In Install Shield, by Build Validate Default Cub file or Browse your own Cub file.
ICE: “Internal Consistency Evaluation”. ICEs are used to validate installation packages.
Some important ICE Error number: There are totally 96 ICE Errors and 14 ICE Errors in the
Windows Installer. Some examples are as follows
A: Cab file is file which stores the compressed files of the application. Cub file is special files which
will create while compiling that contains the ICE errors. When we validate the application with any
validation tool like ORCA, that tool will read get the ICE errors from CUB file and display to the
user.
21
WSM - Microsoft Windows Installer Merge Module Project file
MSM - Microsoft Windows Installer Merge Module
EXE - Executable file
When the application is launched by advertised shortcut, it checks for all the key paths of the
Current Feature, if any of the key paths is missing it will launch Repair.
Note that if there are multiple features then it will not check the missing key paths of the
other features, but only the feature of which the advertised shortcut is launched.
Once the repair of the package is triggered, even with Self Heal, then the whole of the MSI
is reinstalled. Then it does not see that only the feature which triggered the self-heal should
be repaired, but the whole MSI, by which I mean all its features are reinstalled.
Driver packages
Def: If the application has the files with extensions .INF .SYS .PNF then we can conclude
that the application will install Driver entries.
Problem: If the application installs the driver file, which is existed in the system with
same name, then it will give the error that state the “the driver is already existed in the
system”
Custom Action: Using the DPInst.exe or Setupapi.dll , we can create a custom action
to get rid of the problem.
Solution:In driver packages, where we need to customize the package in such a way that
it should check for the max XX value that is present in the machine and install the PNF or
INF file. If the file oem14.INF is the max XX value that is present in the machine, while
installing the package it should install the INF as oem15.INF resulting in the unique name
for the INF file for that machine. For this purpose we write a custom action using
setupapi.dll/DPInst.exe
22
Shortcut Questions:
Advertised and Non-Advertised shortcuts.
A: change the target field in shortcut table from file path to feature to make a non-advertised
shortcut to advertise shortcut.
Launch Actions:
Launch conditions are requirements that the destination computer’s system must meet for
installation to occur. The Launch Conditions are conditions those Values in the Condition
column represent conditions that must be true for the installation to begin. If a condition is not
true, the text in the Message column is displayed to explain to the user why the installation
cannot continue.
Example scenario: If we want install a product for a particular platform like WIN XP or below
to WIN XP then we can use launch condition like below that won’t install the application above
the WIN XP
VersionNT>=501
System search: Use the System Search page to search for specific files or
directories, .INI files, registry entries, or components on the destination computer. Using
these search items, you can search for a previous version of your application, for another
application, or for a particular part of an application.
There are three instances in which you might use this page:
To find a previous version of your application that wasn't installed using Windows Installer
technology.
To find any files or directories, .INI files, registry entries, or components of a previous version
of your application. You can specify the items for which you want to search and then code
your installation so the new version is placed in the same location as the previous one, rather
than in a default location.
To look for a specific third-party application on the destination computer. For example, you
might want to include a feature in your application that is only installed if a certain application
is already installed on the destination computer.
Note: the system search entries will be stored under AppSearch table.
Permissions:
In the MSI, we can give permissions through Lock Permission table. The problem with this
method is if you provide the permissions to a group. In future if some new users join to the
group then he won’t get the permissions.
23
We can give permission for files & folders through VB Script by using the CACLS&XCACLS
commands. CACLs should only run on NTFS partitions.
In VB Script
ORCA
This tool is a Microsoft product. It is used for edit the MSI Databases (tables) and validation
the msi.
o No limitation for the table entries
o Easy to edit the Databases
o If you edit any tables and give save, only those tables will be modified, but in Wise or Install
Shield all the tables will change
Registry
The Registry is a single place for storing information about the Windows OS (Hardware &
Software).
Root Keys
HKEY_CLASS_ROOT (HKCR)
HKEY_LOCAL_MACHINE (HKLM)
HKEY_CURRENT_CONFIG (HKCC)
HKEY_CURRENT_USER (HKCU)
HKEY_USERS (HKU)
Work flow:
24
By the behavior of user profile settings like per user files or HKCU registry keys, these
settings do not come other user when logs in to the machine. So to get rid of the problem we
will add the active setup registry key in our package.
When the new user logs in to the system, these below key will compare.
HKLM\Software\Microsoft\Active Setup\InstalledComponents\%APPNAME% and
HKCU\Software\Microsoft\Active Setup\InstalledComponents\%APPNAME% , and if the HKCU
registry entries don't exist, or the version number of HKCU is less than HKLM, then the specified
stubpath command line will execute. Normally we will key stubpath command line to repair the
application. Once the stubpath will execute whatever the action specified in the command line
like repair will happens and these user specific keys will come for the logged in user.
Example for stubpath: "Stubpath"="msiexec /fups {ProductCode} /q"
[Section]
Keyname=value
Condition: The INI files will be added in INI section than files section because if a INI file add in
INI section, It will append the content of it to the existing file in the system rather than replacing
the old file from the system and also it will remove the content which it added on installation on
uninstallation.
Services:
A windows service is a background process which is loaded by the Service
Control Manager of the OS.
Types:
Win32 Service (Win32 services are the services which is running by the executable file installed
by the Application).
System or Kernel Services (Kernel services are the services which are used by the OS to
communicate to the hardware devices).
25
System DSN (DSN will be available for all users)
User DSN (DSN will be available for that particular user)
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.
Environment Variable can be found under system Properties (My Computer Properties).
To create or modify Environment Variable on the target system, you can use the environment
variable view of the editor, and environment variable changes must be associated with a
component, by default the environment variable data are installed when a component is
installed and removed when the component is removed.
Types
System Variable:
These variables store information related to resources and settings of any logged user on the
target system.
These system Environment variables are stored in Windows Registry
User Variables:
These variables store information related to resources and settings owned by various user
profiles within the system. As a general rule, these variables do not refer to critical system
resources or locations that are necessary for the OS to run.
User Environment variables are stored in Windows Registry
HKEY_CURRENT_USER\Environment
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
Capture Methodologies: Smart Monitor and Snapshot
Smart Monitor
This Setup Capture mechanism monitors and records the installation's operations as they
happen. This method is faster than snapshot comparisons, because it doesn't require a time-
consuming scan of the computer. SmartMonitor records the following operations:
This Setup Capture mechanism scans the computer before installation occurs,
then you perform the installation, then Setup Capture rescans the computer. Setup
Capture records the differences between the two scans and adds them to the
repackaged installation.
1. It does not capture the replacement of files if the files are the same size,
modification date, and version.
2. It does not capture overwriting of existing registry keys.
3. INI file changes are handled differently-if an .INI file is in the Windows directory,
changes to it are recorded as an .INI file change. If an .INI file is outside the
Windows directory, the entire .INI file is added instead of just editing the file.
Merge the results of both methods. If the results of the two methods don't
match, the differences between the methods are added to the repackaged installation
as well. This provides the most accurate and complete representation of the captured
installation. If you selected the snapshot method, the Initial Scan dialog might appear.
Specify whether to rerun the initial scan or use the initial scan that was created
previously.
DLL Hell is the problem related to .DLL (dynamic linking library) files. In the most typical
case, one application will install a new version of the shared component (.dll file) that is not
backward compatible with the version already on the machine, or an application may install
the previous version. All it takes is a single DLL, VBX or OCX to be missing, or present in an
older version for an application to fail.
27
DLL Hell refers to a set of problems caused when multiple applications attempt to
share a common component like a dynamic link library (DLL). The reason for this issue was
that the version information about the different components of an application was not
recorded by the system.
In windows applications some dll’s are shared ones. Suppose App1 is an application
running perfectly. It is sharing a shared dll named shared1.dll. You are installing another
application App2. Suppose App2 application is also having a shared dll named shared1.dll. At
the time of App2 installation, installer will overwrite the shared1.dll which is already there on
our system and being shared by App1. The new shared1.dll may be different than the previous
dll which is overwritten. Now the application app1 which is depending on overwritten
shared1.dll will become defunct. App1 will fail which is referred as dll hell.
Note: In Windows installer technology, the DLL Hell issue is overcome by using the techniques
like Application isolation, Shared DLL reference count and file versioning rules.
28