Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 108

1

Application & Packaging Basics (FAQ)



 * What is Application Repackaging?
It is the process of capturing the changes made by an Installation Program (Package) and it is designed to support company standards and distribution methods.

* What are the steps of Repackaging?


o Review the packaging requirements
o Analyze the vendor package (Review)
o Repackage the application (Scripting)
o Customize the package
o Test the package
o Release the package to end users

* Why it is required & problems in Legacy Installation?


o Customized Installation
o Reduce Cost
o Self Repair
o Source Resiliency
o Unattended Install
o High Support Costs
o Fragile Installs & Uninstalls
o Difficult & labor Intensive to deploy

* What applications should not be repackaged & Why?


o Existing MSI packages should be deployed as they are.
o If you repackage an application and find that it references the MSI.DLL file, it is better not to repackage the application.
o Microsoft Office 2000 and XP are good examples.
o Applications containing system files managed by the Windows File Protection features of Windows 2000 and later are also to be avoided, such as Internet Explorer, Windows
Service Packs and certain hotfixes.

All these applications are hard coded to use the Windows Installer service, and may make calls back to certain locations within the original MSI package.

* What are the types of Packaging tools?


o Wise Package studio
o Install Shield Admin Studio

* What are the types of Deployment tools?


o System center Configuration Manager (SCCM)
o Altiris
2

* What is Windows Installer?


It is a built-in Operating System service for Installing and Managing Applications. It provides a standard method for developing, customizing, installing and updating
applications.

* Benefits of the Windows Installer?


o Advertising
o Installation on Demand
o Repair (Self-healing)
o Rollback (Transactional operations)
o Managed Shared Resources
o Installation in locked-down environments

* What are the types of Setup Captures in Wise / Install shield?


In wise there are three types
o Virtual Capture : Creates a clean virtual OS on your computer, and the installation is redirected in the clean virtual OS.
o SmartMonitor : Watches the installation and records the changes the installation performs.
o Snapshot : Scan the computer before and after the installation and record the differences between the first scan and the second.
In Install Shield there are two types
o Installation Monitor : Repackager watches lower-level system activities and records related changes made to the system by the setup(s) programs
o Snapshot : Scan the computer before and after the installation and record the differences between the first scan and the second.

* MSI Installation Mechanism (Background Mechanism)?


o 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.
o Execution
The installer passes the information to a process with elevated privileges and runs the script.
o 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.

* 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?
3

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-on-
demand and user profile fix-up operate at the Feature level.

* 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 is Registry, Tell the Structure & types of Registry?


The Registry is a single place for storing information about the Windows OS (Hardware & Software). Structure
+ Root Keys / Subtrees
+ Subkeys
+ Hives
+ Entries
Types
+ Machine-Specific (HKCR, HKLM, HKCC, HKU)
+ User-Specific (HKCU, HKU)
Root Keys
+ HKEY_CLASS_ROOT (HKCR)
+ HKEY_LOCAL_MACHINE (HKLM)
+ HKEY_CURRENT_CONFIG (HKCC)
+ HKEY_CURRENT_USER (HKCU)
+ HKEY_USERS (HKU)

* 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 to communicate to the hardware devices).
4

* 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 can’t 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 the run time also).
# INSTALLLEVEL, ….
o Restricted Public
The user can’t 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)
5

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)
+ RebootRequired (Prompts for Reboot)
Yes - Prompt for Reboot
No - Won’t Prompt for Reboot
+ ADDLOCAL (Features to be Installed locally during Run Time)
+ ADDSOURCE (Features to be run from source)
+ INSTALLLEVEL (Which features to be Installed)

* What is Merge Module?


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.

* What are all Merge Module tables?


ModuleSignature, ModuleComponents, ModuleDependency, ModuleExclusion, ModuleAdminUISequence, ModuleAdminExecuteSequence, ModuleAdvtUISequence,
ModuleAdvtExecuteSequence, ModuleIgnore, ModuleInstallUISequence, ModuleInstallExecuteSequence, ModuleSubstitution, ModuleConfiguration

* How the Merge Module is working (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 it will check the Size & Date. It
works by the Mechanism of Shared Dlls Count concept which is stored in the Registry information
“HKLM\Software\Microsoft\Windows\CurrentVersion\SharedDlls\”

* You can create Merge Module for text file, how?


Yes you can create Merge Module for the text file also. It will works by the mechanism of checking the file Size & Date.

* What are the types of Installation modes?


All Windows Installer package should be Installed by the following command line
Msiexec /Option [Optional Parameter]
o 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
6

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*
o Update Options
+ /update
+ /uninstall
+ /p - Applies a Patch
7

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

* 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
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?
8

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

* During Installation how to take a back up copy of the Application through Command line?
I never tried check it out.

* What is Dll Cache folder?


During the process of SFC (System File Checker) or WFP (Windows File Protection), it will scan all the protected files (.SYS, .DLL, .EXE, .TTF, .FON, and .OCX extensions) 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.

* 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

* What is Windows File Protection (WFP)?


WFP is also one Utility tool which will do automatically.
Some applications will replace the system files (SYS, .DLL, .EXE, .TTF, .FON, and .OCX) with different files of the same name or with same file with different versions. If the
files are in a protected folder, then Windows File Protection automatically determines which file was affected, and looks up the file signature in a catalogue file to see if the file
is the correct Microsoft version, and if it is digitally signed. If it is not, then the correct file will be copied over it from either the winnt\system32\dllcache folder, or from the
Windows CD.

* How Do I Control Windows File Protection (WFP)?


All registry settings for WFP/System File Checker are located in “HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows NT\ CurrentVersion\ Winlogon”.
By default, only Administrators and System will be able to modify these settings.
SFCDisable (REG_DWORD)
0 = enabled (default).
1 = disabled, prompt at boot to re-enable (debugger required).
2 = disabled at next boot only, no prompt to re-enable (debugger required).
SFCScan (REG_DWORD)
9

0 = do not scan protected files at boot (default).


1 = scan protected files at every boot.
2 = scan protected files once.
SFCQuota (REG_DWORD)
n = size (in megabytes) of dllcache quota.
FFFFFFFF = cache-protected system files on the local hard drive.
SFCShowProgress (REG_DWORD)
0 = System File Checker progress meter is not displayed.
1 = System File Checker progress meter is displayed (default).
SFCDllCacheDir (REG_EXPAND_SZ)
Path = local location of dllcache directory (default is %Systemroot%\system32\dllcache).

* 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
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 Advertised Feature & Component?


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.

* What is Installation on Demand?


When a user or application activates an advertised feature or product, the installer proceeds with installation of the needed components.

* 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.
* What are the types of Transform?
o Embedded transform
Embedded transforms are stored inside the .msi file of the package.
o Secured transform
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.
o Unsecured transform
Transforms that have not been secured are called unsecured transforms. To apply an unsecured transform, pass the transform file names in the TRANSFORMS property or
command line string during the installation.
* How to Create Transform in Wise / Install Shield?
In Wise Package Studio, by using Install Tailor or New Project -à other templates -à Transform
In Install Shield Admin Studio, by using the New Project -à Transform
10

* How many Transform can be created for one Vendor MSI?


Any Number

* How many Transforms can be supplied in the Command line?


Any Number

* What is Custom Action?


The Microsoft Windows Installer provides many built-in actions for performing the installation process. For some cases the developer writes an action to execute his own
installation is called custom action
* What are the types of Custom Actions?
o DLL file stored in a Binary table stream
o DLL file that is installed with a product
o EXE file stored in a Binary table stream
o EXE file that is installed with a product
o Displays a specified error message and returns failure, terminating the installation
o EXE file having a path specified by a property value
o EXE file having a path referencing a directory
o JScript file stored in a Binary table stream
o JScript file that is installed with a product
o JScript text specified by a property value
o JScript text stored in this sequence table
o VBScript file stored in a Binary table stream
o VBScript file that is installed with a product
o VBScript text specified by a property value
o VBScript text stored in this sequence table
o Property set with formatted text
o Directory set with formatted text
o Installation of a package nested inside of the first package. See Nested Installation Actions
o Installation of a package that resides in the first application’s source tree. See Nested Installation Actions
o Installation of an application that is advertised or already installed. See Nested Installation Actions

* What are the types of Sequences in the Custom Actions?


o Normal User Interface
o Normal Execute Immediate / Deferred
o Administrative User Interface
o Administrative Execute Immediate / Deferred
o Advertisement Execute Immediate / Deferred

* 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
11

* What are the types of In Script options in the Custom Actions?


o 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).
o 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 (Custom actions make changes in the system directly), the custom actions should run in Deferred Execution in User
Context only.
o Rollback only
This Action should be executed during the Installation of the Rollback script or if the Installation is Unsuccessful
o Commit only
This Action should be executed during the Installation of the Commit script.
o Deferred Execution – System 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 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 doesn’t 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.
o 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.
12

* 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.

* What is Launch Condition?


Launch Condition is used to check system requirements on the destination computer

* What is App Search?


App Search action is used to search for existing versions of products (Files, Registry, INI, Directory & Component)

* What is Isolated Component, why we are using and its types?


It means that to prevent overwriting of previous versions of shared components, and ensures that other applications do not overwrite your version of shared components.
o Manifest file concept
o Local file concept

* What is the MSI Assembly tables & its use?


MSI Assembly tables specify Windows Installer settings for Microsoft ®.NET Framework assemblies and Win32 assemblies. It is used for the registration of .Net 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 latest version of Windows Installer?


The latest version of Windows Installer is 4.0

* 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 won’t 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 won’t 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 won’t validate the MSI if that MSI is installed in the local system
13

* What is Conflict Management?


When two or more applications install the same system files (DLLs, .VBXs, and .OCXs), Windows registry, and other items. To detect, Conflict Management should be use and
for resolve the software conflicts, Application Isolation concept should be use

* What are the types of Deployment (Software Distribution)?


o Group policy (Active Directory)
o Software Update Services (SUS)
o Windows Update Web site
o Systems Management service (SMS)

* What is Software Distribution?


One of the more critical aspects to managing a Windows environment is the ability to deploy new applications, updates, upgrades & patches. Distributing new or updated
software is called as Software Distribution.

* What is Group Policy (GPO) & how to set it?


Administrators use Group Policy to define options for managing, configuration of servers, desktops, and groups of users. It is used to set policies across a given site, domain,
or range of organizational units.
Use “gpedit.msc” in the run command to set the policy.

* What is Elevated User & how to create it?


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
Type : DWORD Key: AlwaysInstallElevated Value : 1

* What is Wrapper MSI?


It means that the Application (MSI) is packaged by calling the Exe (Executable file) inside the MSI (Internally calling the source or exe).

* What is Lock down environment?


Software restriction policies provide administrators with a Policy-driven mechanism to identify software running on computers in a domain, and control its ability to execute.
This policy can be used to block malicious scripts, help lockdown a computer, or prevent unwanted applications from running.

* How do deploy the Package?


o Group policy (Active Directory)
o Software Update Services (SUS)
o Windows Update Web site
o Systems Management service (SMS)

* 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.
14

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 is Active Directory?


Deploying applications through the Active Directory is done through the use of group policies, and therefore applications are deployed either on a per user basis or on a per
computer basis.

* What are the other tools which are used during the testing & solving the Issues in the Application?
o Picture Taker
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

* What is Orca tool & what is the purpose and Advantages?


This tool is a Microsoft product. It is used for edit the MSI Databases (tables).
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

* Why multiple MSIExec is running during the Installation?


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).

* 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”

* 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.
15

* What are the types of Upgrades and what is the difference?


o 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)”.
o 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”.
o 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”.
* How you validate the MSI?

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.

* What is ICE?
It means “Internal Consistency Evaluation”. ICEs are used to validate installation packages.

* 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

* What are the File types of Application Packaging?


o WSI - Microsoft Windows Installer Project file
o ISM - Install Shield Project file
o MSI - Microsoft Windows Installer
o MST - Microsoft Transform
o PCP - Windows Installer Patch Project file
o MSP - Microsoft Windows Installer Patch
o WSM - Microsoft Windows Installer Merge Module
Project file
16

o MSM - Microsoft Windows Installer Merge Module


o EXE - Executable file

* How to install the .Exe file through silent mode?


Normally all the .Exe file can be Installed silently by “/ s”. But it depends up on the .EXE file behavior.

* How to register the DLL manually?


By using the command line option “regsvr32”. For example
1. regsvr32 Dll name For Register the Dll
2. regsvr32 /u For Unregistered the Dll
3. regsvr32 /s For Silent register

* What is COM Component?


The Component which is having the COM information entries is called as COM Component. If the component is COM Component, it should have entries in the Class, ProgID,
Registry & Typelib tables in the MSI.
For example most of the merge module components are called as COM Component (MSCOMCTL.ocx, COMCTL.ocx …)

* How the COM Component is working (Mechanism)?


COM Component is working by the mechanism of “Windows Installer Tokens”. It is nothing but “Advertising”.
This token triggers the Windows Installer to check for the key files of the relevant feature and parent features of an MSI. If these tokens are deleted the self healing mechanism
is not invoked. Windows installer tokens should never be part of the registry table of an MSI. They are created at install time by the msiexec service due to the way the MSI has
been authored using advertising.
These tokens exist in 3 forms.
o Tokens within .lnk files that indicate to the OS that they are Windows Installer advertised shortcuts.
o Tokens for advertised file extensions.
o Tokens for advertised COM Dll information.
They have the following structure.
Your browser may not support display of this image.

* What are the default Windows Installer properties?


o [AdminToolsFolder]
C:\Document and Settings\Current User\Start Menu\Programs\Administrative Tools\
o [AppDataFolder]
C:\Document and Settings\Current User\Application Data\
o [CommonAppDataFolder]
C:\Document and Settings\All Users\Application Data\
o [CommonFilesFolder]
C:\Program Files\Common Files\
o [DesktopFolder]
C:\Documents and Settings\Current User\Desktop\
o [FavoritesFolder]
C:\Documents and Settings\Current User\Favorites\\
o [FontsFolder]
17

C:\Windows\Fonts\
o [LocalAppDataFolder]
C:\Documents and Settings\Current User\Local Settings\Application Data\
o [MyPicturesFolder]
C:\Documents and Settings\Current User\My Documents\My Pictures\
o [NetHoodFolder]
C:\Documents and Settings\Current User\NetHood\
o [PersonalFolder]
C:\Documents and Settings\Current User\My Documents\
o [PrintHoodFolder]
C:\Documents and Settings\Current User\PrintHood\
o [ProfilesFolder]
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:\
* What are the default Environment settings in XP?
o ALLUSERSPROFILE
C:\Documents and Settings\All Users
o APPDATA
C:\Documents and Settings\current User\Application Data
o CommonProgramFiles
18

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
o Windir
C:\Windows

* What is Package Code?


The Package Code is a GUID identifying a particular Microsoft Windows Installer package. It associates an .MSI file.

* What is Product Code?


The Product Code is a GUID identifying a particular Application or product.

* What is the difference between Static & Dynamic scanning?


o Static Scanner : This scanner looks at all the files included in the project and checks for any dependencies. It then recommends all the possible dependencies and allows you
to add them to the project.
o Dynamic Scanner : The Dynamic Scanner monitors the system for dynamically loaded files in memory while running the application file. Use the dynamic scanner to launch
your application and test the controls in the application. Some of these controls load files in the memory that are picked by the dynamic scanner. This scanner then
recommends all these files in the form of a list from which you select or deselect files. All the selected files are added to the project by this scanner. The dynamic scanner is
more robust than the static scanner and certainly picks more dependencies.

* What is the Event Viewer, how to open & what is it use?


It is a Windows utility tool in the OS. You can open by giving “eventvwr” in the run command also.
It is used to view all exceptional events occur in the OS and also for the System administrator to track the performance of the OS.
19

* 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.

* What is Wise Script?


I never worked on.
* 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.

Custom Actions :InstallExecuteSequence


Merge Modules & Nested Executables :as a.msm file component, Avoids version conflicts
self heal or self repair

Transforms
.mst file
Secure, unsecure, embeded
defualt -unsecure (can modify)
20

secure -read only

Microsoft Windows Installer

Microsoft included Windows Installer as a core service (msiexec.exe) within Windows 2000 to install, repair, and remove software
based on instructions contained in .MSI files.

These .MSI files are basically database files that contain all the information an application needs in order to install a packaged
application. Then once you package your application you can deploy it using Group Policy by one of two methods:

Assigning an application. You can assign a .MSI package to either a computer or a user. If you assign it to a computer, the
packaged application installs the next time the computer reboots. If you assign it to a user, the application typically installs when the
user tries to run it from the Start menu or tries to open a file that has a file extension associated with the application.

Publishing an application. You can publish a .MSI package to users only. This provides the user with an option within Add or
Remove Programs in Control Panel that lets them manually install the application if they want to.

This tool fully complies with Microsoft’s .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.
21

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.

Installation package file


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.

Because the database is relational, changes made to one table are propagated automatically throughout the database. This is a
very efficient process for introducing consistent changes into the installation process that simplifies customizing a large application
or group of applications. The Windows Installer database tables reflect the general layout of the entire group of applications,
including:

 Available features
 Components
 Relationships between features and components
 Necessary registry settings

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.
22

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.

How do I install only the features I want?

The ADDLOCAL, ADDSOURCE, and ADVERTISE properties can be used to install only a certain number of known features. The following command-line
script would be used to install the "Sports" and "News" features of the example.msi package locally on the machine.

msiexec /i example.msi ADDLOCAL=Sports,News /qb

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 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.


23

• Assigned or published on Windows 2000 and later by an Administrator.

• Marked as managed by another software and deployment management system. The exact method depends on 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.

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.
24

Additionally, when making a change to the system by means of a 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 feature-component structure for the package. Significant changes can be made to the feature-
component structure in the scope of a major update.

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
withBegin and ending with ExecuteAction. ExecuteAction is the one that triggers the execute sequence. At the end of the
installation process, the installer returns from the execute sequence in the UI Sequence. It does that in order to execute the actions
that may be specified after ExecuteAction. The installation process ends with the ExitDialog.
The Execute Sequence contains a list of Standard Actions that starts with Begin and ends with InstallFinalize. It also can contain
all types of custom actions: immediate, deferred, rollback and commit actions. In Advanced Installer, the Execute Sequence
standard actions are organized in three categories:
25

 Before Initialization
 Before File Installation
 Before Finalization
In the "Before Initialization" category only immediate actions can be used. The sequence that starts with the InstallInitializestandard
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 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.
26

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 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 Description
Predefined path variables are path variables that point to some of the most commonly
Predefined
used folders. Unlike other types of path variables, these values cannot be edited in
Path Variables
InstallShield.
See Registry The values of registry-based path variables are derived from the registry keys you
Path Variables created. After creating the registry key, you need to set a path variable to this key.
Environment path variables are based on the values of your system's environment
Environment
variables. You can set an environment path variable to an existing environment
Variables
variable.
Standard Path Standard, or user-defined, path variables are defined through InstallShield. You can
Variables specify a path variable such as <MyFiles> with a value of C:\Work\Files. These
27

variables do not rely on any outside sources, 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
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
Begin starts the UI sequence (when the dialogs are shown)
PrepareDlg "PrepareDlg" dialog is shown
AppSearch performs the searches in the Search page
older or newer versions of the package are searched. If an older version is found, its Product Code is placed in the
FindRelatedProducts
"OLDPRODUCTS" property
LaunchConditions evaluates the launch conditions
CCPSearch validates that qualifying products are installed on a system before an upgrade is performed
RMCCPSearch validates that qualifying products are installed on a system before an upgrade is performed
CostInitialize determines the disk space required by the install process
FileCost determines the disk space required by each file in the Files and Folders page
CostFinalize ends the disk space costing and resolves the folders in the project
MigrateFeatureStates during an upgrade it reads the feature states in the old version and then sets these feature states in the new version.
WelcomeDlg "WelcomDlg" dialog is shown
ResumeDlg "ResumeDlg" dialog is shown
MaintenanceWelcomeDlg "MaintenanceWelcomeDlg" dialog is shown
28

PatchWelcomeDlg "PatchWelcomeDlg" dialog is shown


ProgressDlg "ProgressDlg" dialog is shown
ExecuteAction starts the Execute sequence (when the actual installation is performed)

InstallExecuteSequence
Before Initialization

Standard Action Description


Begin starts the Execute sequence (when the actual installation is performed)
AppSearch performs the searches in the Search page
older or newer versions of the package are searched. If an older version is found, its Product Code is placed in the
FindRelatedProducts
"OLDPRODUCTS" property
LaunchConditions evaluates the launch conditions
CCPSearch validates that qualifying products are installed on a system before an upgrade is performed
RMCCPSearch validates that qualifying products are installed on a system before an upgrade is performed
ValidateProductID sets the ProductID property to the full product identifier
CostInitialize determines the disk space required by the install process
FileCost determines the disk space required by each file in the Files and Folders page.
installs a copy of a component (commonly a shared DLL) into a private location for use by a specific application
IsolateComponents (typically an .exe). This isolates the application from other copies of the component that may be installed to a shared
location on the computer
CostFinalize ends the disk space costing and resolves the folders in the project
checks for existing ODBC drivers on the system and sets the target directory of each new driver to the location of an
SetODBCFolders
existing driver
MigrateFeatureStates during an upgrade it reads the feature states in the old version and then sets these feature states in the new version
verifies that all volumes to which cost has been attributed have sufficient space for the installation. It also notifies the
InstallValidate
user if one or more files to be overwritten or removed are currently in use by an active process
RemoveExistingProducts upgrades an older version of the package if one is found
29

Before File Installation

Standard Action Description


InstallInitialize marks the beginning of the sequence of actions which change the system
AllocateRegistrySpace ensures that an appropriate amount of free registry space exists in the registry.
ProcessComponents registers and unregisters components, their key paths and the component clients
MsiUnpublishAssemblies unpublishes the assemblies installed by the package. Runs only during an uninstall
Uninstall removes components
UnpublishComponents removes information about components published by the package. Runs only during an uninstall
removes selection-state and feature-component mapping information from the system registry. Runs only during an
UnpublishFeatures
uninstall
StopServices stops services which use "Stop" control operations in the package
DeleteServices removes services which use "Delete" control operations in the package.
UnregisterComPlus removes COM+ applications from the registry. Runs only during an uninstall
SelfUnregModules unregisters all modules which used self registration during install. Runs only during an uninstall
UnregisterTypeLibraries unregisters type libraries from the system. Runs only during an uninstall
RemoveODBC removes the ODBC data sources, translators and drivers. Runs only during an uninstall
UnregisterFonts removes registration information about installed fonts from the system. Runs only during an uninstall
RemoveRegistryValues removes registry entries created in the Registry page. Runs only during an uninstall
UnregisterClassInfo manages the removal of COM class information from the system registry. Runs only during an uninstall
UnregisterExtensionInfo manages the removal of extension-related information from the system registry. Runs only during an uninstall
UnregisterProgIdInfo manages the unregistration of OLE ProgId information with the system. Runs only during an uninstall
UnregisterMIMEInfo unregisters MIME-related registry information from the system. Runs only during an uninstall
RemoveINIValues removes INI files or entries created in the Files and Folders page. Runs only during an uninstall
RemoveShortcuts removes the shortcuts created in the Files and Folders page. Runs only during an uninstall
RemoveEnvironmentStrings modifies or removes the environment variables created in the Environment page. Runs only during an uninstall
RemoveDuplicateFiles removes files created by File Duplication operations. Runs only during an uninstall
30

RemoveFiles removes the files created in the Files and Folders page. Runs only during an uninstall
RemoveFolders removes the folders created in the Files and Folders page. Runs only during an uninstall
CreateFolders creates the folders specified in the Files and Folders page.
MoveFiles moves or copies files which use File Move operations

Before Finalization

Standard Action Description


InstallFiles installs the files specified in the Files and Folders page
PatchFiles patches files included in the patch. Runs only during a patch installation
DuplicateFiles duplicates the files which use File Duplication operations
binds each executable or DLL that must be bound to the DLLs imported by it. This is not used by packages created
BindImage
with Advanced Installer
CreateShortcuts creates the shortcuts specified in the Files and Folders page
RegisterClassInfo manages the registration of COM class information with the system
RegisterExtensionInfo manages the registration of extension related information with the system.
RegisterProgIdInfo manages the registration of OLE ProgId information with the system
RegisterMIMEInfo registers MIME-related registry information with the system
WriteRegistryValues creates the registry values specified in the Registry page
WriteINIValues creates INI files or entries specified in the Files and Folders page
WriteEnvironmentStrings creates or modifies the environment variables created in the Environment page
RegisterFonts registers fonts marked for registration
InstallODBC installs ODBC drivers, translators and data sources
RegisterTypeLibraries registers type libraries with the system
SelfRegModules registers the modules which use self registration
RegisterComPlus registers COM+ applications
InstallServices installs services specified in the Services page
StartServices starts services which use "Start" control operations in the package
31

Rollback performs installation rollback in case of an error


Install installs or removes components
Commit removes rollback information
RegisterUser creates users and groups specified in the Users and Groups page
RegisterProduct registers the product information with the installer and with Add/Remove Programs. Also, it caches the MSI package
PublishComponents manages components which need to be published
MsiPublishAssemblies publishes the assemblies installed by the package
PublishFeatures writes each feature's state into the system registry
manages the advertisement of the product information with the system. This action publishes the product if the product
PublishProduct
is in advertise mode or if any feature is being installed or reinstalled
InstallIIS manages the elements created in the IIS page
runs a script that contains all operations spooled since the installation started. Also, it marks the end of the Execute
sequence
InstallFinalize

1. Application & Packaging Basics (FAQ)

1. Question 1. What Is Application Packaging?


Answer :
Process of creating an installer for an application is called application packaging. Usually in it binary files provided by developers are
packaged to form a package. The Main difference between packaging and re-packaging is that the source files does not come in the form of
package in packaging where as in re-packaging they come in a form of a package, which might be MSI or legacy package (such as
executable, batch files, etc).
32

2. Question 2. What Is Application Repackaging?


Answer :
Repackaging (Customized Installation) is the process of capturing the changes made by an Installation Program (Package) and it is
customized to support company standards and distribution methods.
It is not necessary to do setup capture to call it repackaging, even creating must files or is files can be called application repackaging.
3. Question 3. What Are The Steps Of Repackaging?
Answer :
o Review the packaging requirements (User Requirement Review).
o Analyze the vendor package (Tech Review).
o Repackage the application (Setup capture).
o Customize the package (Scripting).
o Test the package (Testing & UAT).
o Release the package to end users (Deployment).
Question 4. Why Repackaging Is Required & What Are The Problems In Legacy Installation?
Answer :
Most common reasons for Re-packaging are as follows:
o Customized Installation.
o Reduce Support Costs.
o Self Repair.
o Source Resiliency.
o Unattended Install.
The problems with Legacy Installations:
o High Support Costs.
o Fragile Installs & uninstalls.
o Difficult & labor Intensive to deploy.
Question 5. Name Few Msi Packaging Tools?
Answer :
o Wise Package Studio.
o Install Shield.
o WIX (It cannot be used for re-packaging).
o Visual Studio.
Question 6. Name Few Msi Re-packaging Tools?
33

Answer :
o Wise Package Studio
o Install Shield

Question 7. Name Few Deployment Tools?


Answer :
o SCCM
o Altiris
Question 8. What Is Windows Installer?
Answer :
Windows Installer (previously known as Microsoft Installer) is a built-in Operating System service for Installing and Managing Applications.
It provides a standard method for developing, customizing, installing and updating applications.

Question 9. Benefits Of The Windows Installer?


Answer :
o Advertising
o Installation on Demand
o Repair (Self-healing)
o Rollback (Transactional operations)
o Managed Shared Resources
Question 10. Msi Installation Mechanism (background Mechanism)?
Answer :
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.
34

Question 11. What Is A Msi?


Answer :
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.
Question 12. Structure Of Msi?
Answer :
o Products (Collection of Features)
o Features (Collection of Components)
o Components (Collection of files and Registries)
Question 13. What Is Product?
Answer :
A single, installed, working program (or set of programs) is a product. A product is identified by a unique GUID (the ProductCode property).
A product is not the same as a package: a single MSI package might install multiple different products. For example, an MSI might install
French and English versions of a program, each of which is a different product.
Question 14. What Is Feature?
Answer :
Features are buckets for Components. Windows Installer configuration commands operate only on Features (installing, advertising,
Uninstalling). Self-healing, installon- demand and user profile fix-up operate at the Feature level.

Question 15. What Is Component?


Answer :
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.
Question 16. What Is Self-healing?
Answer :
When an MSI-based application is launched (by clicking on an advertised shortcut or file type association), Windows Installer checks the
existence of key path items.
35

If there is a mismatch between the current system state and the value specified in the MSI package (e.g., a key file or registry is missing), then
the related feature is reinstalled. This process is also known as self-healing or self-repair.
Question 17. What Is The Difference Between Self-healing And Repair?
Answer :
Self Heal and Repair are two different concepts in Windows Installer which people many times consider to be the same thing however there
is difference in these two.
Self Heal is triggered by advertised shortcuts, or other advertising information in the package which eventually Repairs the application.
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.
Repair of an MSI can be triggered by:
o Repair button in Add/Remove programs
o Giving the command line msiexec /f{other option} {MSI name}
o Self Heal by advertised shortcut or other advertising information
o Active setup
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.
Question 18. What Is Registry, Tell The Structure & Types Of Registry?
Answer :
The Registry is a single place for storing information about the Windows OS (Hardware & Software):
o Root Keys / Subtrees
o Subkeys
o Hives
o Entries
Types of Registry keys:
o Machine-Specific (HKCR, HKLM, HKCC, HKU)
o User-Specific (HKCU, HKU)
Types of Registry Root keys:
o HKEY_CLASS_ROOT (HKCR)
o HKEY_LOCAL_MACHINE (HKLM)
36

o HKEY_CURRENT_CONFIG (HKCC)
o HKEY_CURRENT_USER (HKCU)
o HKEY_USERS (HKU)
Question 19. What Are Shortcuts & Types?
Answer :
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).

Question 20. What Are Ini File & Its Format?


Answer :
INI files are plain-text files that contain configuration information. "INI" stands for:
initialization.
[Section]
Keyname=value.
Question 21. What Are Services & Its Types?
Answer :
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 to communicate to the hardware devices).
Question 22. Where Is Service Information Stored?
Answer :
Most of the Service information are stored under the windows registry hive “HKLMSystemCurrentControlSetName of the Service”.
Question 23. In The Msi, Which Tables Contain Information About The Service Details?
Answer :
o Service Install (Service Details)
o Service Control (Controlling the service during Installation & Un Installation)
Question 24. What Is Odbc & Dsn And Its Types?
Answer :
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.
37

o System DSN (DSN will be available for all users)


o User DSN (DSN will be available for that particular user)

Question 25. What Is File Association?


Answer :
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.
Question 26. What Is Environment Variable & Its Types?
Answer :
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)
Question 27. What Is Property & Types Of Properties, Give Some Examples?
Answer :
Properties are global variables that the Microsoft Windows Installer uses during an installation.
Private: The installer can be use only internally (values can’t be changed during the run time).
Manufacture, ProductCode, ProductID, ProductName, ProductVersion ……
Public: The installer can be uses both internally & externally (values can be changed during the run time also).
INSTALLLEVEL, ….
Restricted Public: The user can’t change the value both internally & externally due to security purposes. ALLUSERS, REBOOT,
REINSTALLMODE.
Question 28. What Is Merge Module?
Answer :
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.
Question 29. Name Few Merge Module Tables?
Answer :
o ModuleSignature,
38

o ModuleComponents,
o ModuleDependency,
o ModuleExclusion,
o ModuleIgnore,
o ModuleSubstitution,
o ModuleAdminUISequence,
o ModuleAdminExecuteSequence,
o ModuleConfiguration,
o ModuleAdvtUISequence,
o ModuleAdvtExecuteSequence,
o ModuleInstallUISequence,
o ModuleInstallExecuteSequence.

Question 30. Detail The Background Mechanism Of Merge Module?


Answer :
If there are a number of applications that require a specifically configured component, it would be possible to create a merge module that
installs and
configures that component. That merge module could then be added to the installation packages of each product that required that particular
component.
This saves the effort of having to individually add the necessary files, registry entries, and other components to every installation. It also
saves time if updates are needed, as instead of updating the installations for all five applications, only the merge module is updated, and the
installations only need to be rebuilt.
Question 31. How To Give Permission For Files, Folders & Registry Keys In Msi?
Answer :
In the MSI, we can give permissions through Lock Permission table. But using subinacl.exe custom action is the best way to set permissions.
Question 32. How To Give Permission For Files, Folders & Registry Keys Through Vb Script & What Is The Syntax?
Answer :
We can give permission for files & folders through VB Script by using the CACLS & XCACLS commands:
o CACLs should only run on NTFS partitions.
o CACLS – Changes Access Control ListS
39

o “Cacls <file name> [/T] [/E] [/C] [/G user: perm] [/R user [...]] [/P user: perm [...]]
o [/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 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 <user name>: F”
Question 33. How To Install Only One Particular Feature During The Installation Through Command Line?
Answer :
msiexec /i <msi> ADDLOCAL=<Feature Name>

Question 34. How To Disable Arp (add/remove Programs) Details During The Installation Through Command Line, Tell Some Arp
Properties?
Answer :
msiexec /i <msi> ARPSYSTEMCOMPONENT=1
Following entries are various ARP properties:
a) ARPAUTHORIZEDCDFPREFIX
b) ARPCOMMENTS
c) ARPCONTACT
d) ARPINSTALLLOCATION
e) ARPNOMODIFY
f) ARPNOREMOVE
40

g) ARPNOREPAIR
h) ARPPRODUCTICON
i) ARPREADME
j) ARPSIZE
k) ARPSYSTEMCOMPONENT
l) ARPURLINFOABOUT
m) ARPURLUPDATEINFO
Question 35. What Is Advertisement?
Answer :
It means that, the Availability of an application to users or others with out actually the full Installation. There are two types of Advertising
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.
Publishing :
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.
Question 36. What Is Advertised Feature & Component?
Answer :
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.
Question 37. What Is Installation On Demand?
Answer :
When a user or application activates an advertised feature or product, the installer proceeds with installation of the needed components.
Question 38. What Is Transform?
Answer :
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.

Question 39. What Are The Types Of Transform?


Answer :
41

a) Embedded transform
Embedded transforms are stored inside the .msi file of the package.
b) Secured transform
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.
c) Unsecured transform
Transforms that have not been secured are called unsecured transforms. To apply an unsecured transform, pass the transform file names in the
TRANSFORMS property or command line string during the installation.
Question 40. How Many Transform Can Be Created For One Vendor Msi?
Answer :
There is no restriction on the numbers of transforms which can be created for one Vendor MSI.
Question 41. How Many Transforms Can Be Supplied In The Command Line?
Answer :
There is no restriction on the numbers of transforms which can be supplied in the command line.
Question 42. What Is Custom Action?
Answer :
The Microsoft Windows Installer provides many built-in actions for performing the installation process. For some cases the developer writes
an action to execute his own installation is called custom action.
Question 43. What Are The Types Of Custom Actions?
Answer :
o DLL file stored in a Binary table stream
o DLL file that is installed with a product
o EXE file stored in a Binary table stream
o EXE file that is installed with a product
o Displays a specified error message and returns failure, terminating the installation
o EXE file having a path specified by a property value
o EXE file having a path referencing a directory
o JScript file stored in a Binary table stream
o JScript file that is installed with a product
o JScript text specified by a property value
42

o JScript text stored in this sequence table


o VBScript file stored in a Binary table stream
o VBScript file that is installed with a product
o VBScript text specified by a property value
o VBScript text stored in this sequence table
o Property set with formatted text
o Directory set with formatted text
o Installation of a package nested inside of the first package. See Nested Installation Actions
o Installation of a package that resides in the first application’s source tree. See Nested Installation
o Actions
o Installation of an application that is advertised or already installed. See Nested Installation Actions.
Question 44. What Are The Types Of Sequences In The Custom Actions?
Answer :
o Normal User Interface
o Normal Execute Immediate / Deferred
o Administrative User Interface
o Administrative Execute Immediate / Deferred
Question 45. What Are The Types Of In Script Options In The Custom Actions?
Answer :
a) 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).
b) Deferred Execution – User Context
Deferred custom actions can only be sequenced between the Install Initialize and Install Finalize 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 Install Execute, Install Execute Again, or Install Finalize action is run. If the
Current User doesn’t have the elevated privileges (Custom actions make changes in the system directly), the custom actions should run in
Deferred Execution in User Context only.
c) Rollback only
This Action should be executed during the Installation of the Rollback script or if the Installation is Unsuccessful.
d) Commit only
43

This Action should be executed during the Installation of the Commit script.
e) Deferred Execution – System Context
Deferred custom actions can only be sequenced between the Install Initialize and Install Finalize 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 Install Execute, Install Execute Again, or Install Finalize 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.

Question 46. What Is The Difference Between “immediate Execute / Deferred Execute”?
Answer :
o Immediate custom actions, can be sequenced anywhere within any of the sequence tables
o Deferred custom actions can only be sequenced between the Install Initialize and Install Finalize actions in execute sequence tables
o Immediate custom actions have access to the Installation database
o Deferred custom actions doesn’t have access to the Installation database
o Immediate custom actions can only run in the User Context
o Deferred custom actions can run both in the context of the user and elevated using the system context.
Question 47. What Is The Difference Between “deferred In System Context / Deferred In User Context”?
Answer :
o If the Custom action which installs or modify a file under the INSTALLDIR or Installation should be run in “Deferred in User
Context”.
o If the Custom action which installs or modify the system file directly should be run in “Deferred Execution in System Context”.
Question 48. What Are The Types Of Processing Options In The Custom Actions And What Is The Use?
Answer :
A) 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.
b) 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.
c) A synch, 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.
44

d) A synch, 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.
Question 49. What Are The Types Of Scheduling Options In The Custom Actions And What Is The Use?
Answer :
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.
Question 50. What Is Launch Condition?
Answer :
Launch Condition is used to check system requirements on the destination computer.
Question 51. What Is App Search?
Answer :
App Search action is used to search for existing versions of products (Files, Registry, INI, Directory & Component)
Question 52. What Is Isolated Component, Why We Are Using And Its Types?
Answer :
It means that to prevent overwriting of previous versions of shared components, and ensures that other applications do not overwrite your
version of shared components.
a) Manifest file concept
b) Local file concept
Question 53. What Is The Use Of Msi Assembly Tables?
Answer :
It is used for the registration of .Net Assembly files
Question 54. What Is The Latest Version Of Windows Installer?
Answer :
The latest version of Windows Installer is 4.5
Question 55. What Is The Latest Version Of Wise Package Studio & Install Shield Admin Studio?
Answer :
Will change with time.
Question 56. What Is Conflict Management?
45

Answer :
When two or more applications install the same system files (DLLs, .VBXs, and .OCXs), Windows registry, and other items. To detect,
Conflict Management should be use and for resolve the software conflicts, Application Isolation concept should be use.
Question 57. What Are The Types Of Deployment (software Distribution)?
Answer :
o Group policy (Active Directory)
o Software Update Services (SUS)
o Windows Update Web site
o Systems Management service (SMS)
Question 58. What Is Software Distribution?
Answer :
One of the more critical aspects to managing a Windows environment is the ability to deploy new applications, updates, upgrades & patches.
Distributing new or updated software is called as Software Distribution.
Question 59. What Is Group Policy (gpo) & How To Set It?
Answer :
Administrators use Group Policy to define options for managing, configuration of servers, desktops, and groups of users. It is used to set
policies across a given site, domain, or range of organizational units. Use “gpedit.msc” in the run command to set the policy.
Question 60. What Is Elevated User & How To Create It?
Answer :
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_MACHINESOFTWAREPoliciesMicrosoftWindowsInstaller
Type: DWORD Key: Always Install Elevated Value: 1
Question 61. What Is Wrapper Msi?
Answer :
When an Executable is wrapped within an MSI then that msi is called wrapper msi.
Question 62. What Is Lock Down Environment?
Answer :
Software restriction policies provide administrators with a Policy-driven mechanism to identify software running on computers in a domain,
and control its ability to execute. This policy can be used to block malicious scripts, help lockdown a computer, or prevent unwanted
applications from running.
Question 63. What Is Intellimirror?
46

Answer :
Intelli Mirror management technologies are 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.
Question 64. What Is Active Directory?
Answer :
Deploying applications through the Active Directory is done through the use of group policies, and therefore applications are deployed either
on a per user basis or on a per computer basis.
Question 65. What Are The Other Tools Which Are Used During The Testing & Finding Solving The Issues In The Application
Packaging?
Answer :
o Picture Taker
o Windows Install Master
o InstallRite
o RegMon
o FileMon
o procmon
o Process Explorer
o CsDiff
o Icon Extractor & Icon Builder
o RegExtractor
o WiLogUtl
o WiseComReg
Question 66. What Is Orca Tool & What Is The Purpose And Advantages?
Answer :
Microsoft utility to view, update, validate MSI & MST files.
Question 67. What Is Package Code?
Answer :
The Package Code is a GUID identifying a particular Microsoft Windows Installer package. It associates an .MSI file.
Question 68. What Is Product Code?
Answer :
47

The Product Code is a GUID identifying a particular Application or product.


Question 69. What Are The Disadvantage/drawbacks Of Msi?
Answer :
Resiliency: Resiliency can be inconsistent with repackaged applications because the repackager utility may not fully understand the
component dependencies or what the key paths of the application should be. Therefore, an application may be packaged into one large feature
that gets entirely reinstalled if a component keypath is missing. If it were broken up into multiple smaller features it would enable a more
manageable resiliency. COM/ActiveX
Registration: Component Object Model (COM) and ActiveX controls may not be properly registered. Prior to Windows Installer, COM and
ActiveX registration was a black box. Except for the exported functions DLLRegisterServer and DLLUnregister server, COM and ActiveX
controls offered very few hints of their registration process. RegSvr32.exe was responsible for calling the previously mentioned functions and
then the DLL was responsible for registering itself. There is no utility that can view a DLL, an OCX, or an EXE and figure out what goes on
inside DllRegisterServer and DllUnregisterServer for that file. There are standard registry entries that most COM and ActiveX controls
register, such as HKCRCLSID, HKCRProgID, and HKCRTypeLib. Information on COM registration may or may not get entered into the
appropriate MSI tables by the repackager.
Shortcuts: Shortcuts may not be created as Windows Installer descriptor shortcuts, which enable resiliency. Legacy setup shortcuts were .lnk
files that pointed to an executable in most cases. Sometimes when the repackager runs, all it knows is that an .lnk file was copied to a
directory. For example, a legacy Setup.exe installed a shortcut to C:WindowsProfilesUser1Desktop. The repackager would copy the .lnk file
directly to the directory listed previously. Therefore, the repackager is not actually copying a Windows Installer shortcut, but rather it is
copying a file without any resiliency capabilities included.
Isolated Components: The only way to take advantage of isolated components is to author a new MSI package. Repackagers currently do
not support this feature. Application Removal:When uninstalling a repackaged application, it is possible that the AllUsers profile.
Question 70. What Is Advertisement And Command For Advertisement?
Answer :
It means that, the Availability of an application to users or others with out actually the full Installation. There are two types of Advertising.
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.
Publishing: 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.
Syntax
Ø msiexec /j [{u|m}] package
Ø msiexec {u|m} package /t TransformList
Ø msiexec {u|m} package /g LanguageID
48

Parameters
Ø /j : Advertises a product.
Ø u : Advertises to the current user.
Ø m : Advertises to all users of the computer.
Ø package : Specifies the Windows Installer package file.
Ø /g LanguageID : Identifies the language.
Ø /t TransformList : Applies transform to advertised package.
Question 71. What Is Admin Install And Command For It?
Answer :
The Windows Installer can perform an administrative installation of an application or product to a network for use by a workgroup. An
administrative installation installs a source image of the application onto the network that is similar to a source image on a CD-ROM. Users
in a workgroup who have access to this administrative image can then install the product from this source. A user must first install the product
from the network to run the application. The user can choose to run-from-source when he installs and the installer uses most of the product's
file directly from the network. Administrators can run an administrative installation from the command line by using the /a command line
option. The ADMIN action is the top-level action used to initiate an administrative installation. When this action is executed the installer calls
the actions in the AdminExecuteSequence and AdminUISequence tables to perform the administrative installation.
Syntax: Msiexec /a package
Question 72. For Which Type Of Packages Admin Install Fail?
Answer :
Any MSI which installs files based on selection, be it from command line, System Search or selected options while installing.
Question 73. What Is Transaction Processing?
Answer :
One or more operations processed together as a single indivisible whole called a transaction. All the constituent operations must succeed for
the transaction to succeed, otherwise all the operations are rolled back to the original state.
Windows Installer 4.5 includes support for installing multiple packages using transaction processing. The packages are chained together and
processed as a single transaction. If one or more of the packages in the transaction cannot be installed successfully or if the end user cancels
the installation, the Windows Installer initiates rollback for all of the packages to restore the system to its earlier state.
Question 74. What Is Dll Cache Folder?
Answer :
It is the folder in which Microsoft Windows stores protected system files.
Question 75. What Are The Addlocal And Addsource Properties?
49

Answer :
ADDLOCAL: It will install the components (file resources) associated with the feature locally on the client the package is installed on.
ADDSOURCE: The files will be “installed” on the source meaning where the MSI is originally located. There will actually not be any
installation of files into the folder but they must exists as “external uncompressed”.
Question 76. Explain The Difference Between Property And Property?
Answer :
Property: Private Properties in MSI (Properties that cannot be changed during runtime).
PROPERTY: Public Properties (Properties that can be changed during runtime).
Question 77. Use Of Installevel Property?
Answer :
The INSTALLLEVEL property is the initial level at which features are selected “ON” for installation by default. A feature is installed only if
the value in the Level field of the Feature table is less than or equal to the current INSTALLLEVEL value. The installation level for any
installation is specified by the INSTALLLEVEL property, and can be an integral from 1 to 32,767.
Question 78. What Is The Difference Between Repair And Self Healing?
Answer :
Self Heal and Repair are two different concepts in Windows Installer which people many times consider to be the same thing however there
is difference in these two.
Self Heal is triggered by advertised shortcuts, or other advertising information in the package which eventually Repairs the application.
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.
Repair of an MSI can be triggered by:
• Repair button in Add/Remove programs
• Giving the command line msiexec /f{other option} {MSI name}
• Self Heal by advertised shortcut or other advertising information
• Active setup
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.
50

Question 79. Difference Between Run, Run Once, Active Setup?


Answer :
Active Setup:
It is used when your application requires installation of components such as files or registry keys on a per-user basis, but application has no
advertised entry points or other triggers to initiate the installation process.
Run:
The Run key is processed after every logon, either by the Explorer shell, if it is present, or by First Boot Agent (FBA), if a custom shell,
Command shell, or Task Manager Shell is used. If FBA processes this key, it does so after every logon, not during first boot as it normally
would. Typically, this flag is used to load Systray applications, launch services in executables, hide autostart applications, or hide background
processes
Run Once:
The RunOnce key is processed only once, by FBA, after Plug and Play device enumeration and DLL registration processing have completed.
The values of this
registry key are deleted from the registry after it is processed, so that it will not run again. Typically, this flag is used when a reboot is
required, such as for a DLL or OCX registration, or for cleaning up a setup or an uninstall.
Question 80. What Is The Logical Structure Of Package?
Answer :
A package describes the installation of a full product (Windows Installer does not handle dependencies between products) and is universally
identified by a GUID. A product is made up of components, grouped into features.
Components:
A component is the minimal part of a product—each component is treated by Windows Installer as a unit: the install developer cannot, for
example, use a
condition to specify to install just part of a component. Components can contain files,groups of files, directories, COM components, registry
keys, shortcuts, and other data. The end user does not directly interact with components.
Components are identified globally by GUIDs, thus the same component can be shared among several features of the same package or
multiple packages, ideally through the use of merge modules (although, for this to work correctly, different components should not share any
sub-components).
Key paths:
51

A key path is a specific file, registry key, or ODBC data source that the package author specifies as critical for a given component. Because a
file is the most common type of key path, the term key file is commonly used. A component can contain at most one key path; if a component
has no explicit key path, the component's destination directory is taken to be the key path.
When an MSI-based application is launched, Windows Installer checks the existence of these critical files or registry keys (that is, the key
paths). If there is a mismatch between the current system state and the value specified in the MSI package (e.g., a key file is missing), then the
related feature is re-installed. This process is also known as self-healing or self-repair. No two components should use the same key path.
Features :
A feature is a hierarchical group of components—a feature can contain any number of components and other features (a feature contained in
another feature is called a "subfeature"). Most installation programs display a "custom setup" dialog box at run time, from which the end user
can select which features to install or remove.
The package author defines the product features. A word-processing program, for example, might provide features for the main program
executable, the program's help files, and optional spelling checker and stationery modules.

Question 81. Advantages Of Packaging (creating Msi Packages)?


Answer :
1. Customize Applications to suit the user needs.

2. Simplify the Installation and Un-installation Procedures.

3. Saves Time in both Installation and Un-installation.

4. Once packaged, applications can be quickly installed on a range of desktops in multiple locations, saving administrative costs, simplifying
the manage of
licensing fees and minimizing support and repair expenditures.
52

5. Saves Space of the product by doing apt modifications to applications.

6. Has a great flexibility of obtaining the lost files through a phenomenon called Self Heal, this reduces the down time of application. If a
critical file (a .DLL or
.EXE file, for example) that is part of the distribution is corrupt or is deleted, the user can be prompted to repair the installation by presenting
the original
.MSI distribution. Additionally, if the installation media is available (for example, on a network share), the repair simply happens
automatically.

7. Can be advertised. So that on demand installation could take place.

8. Upgrading of the application can be done with ease.

9. Clean installation and Un-Installation is achieved by a process called Roll- Back.

10. Simplifies management of new user set-up along with the revision and distribution of software repairs and new applications to existing
users. Application recovery can also be improved.

11. Helps eliminate uncontrolled software downloads and installation, enables applications to be safely removed and reduces non-business
traffic on a
corporate network.

12. Using .MSI format, can automate software distribution process and ensure that the installation doesn’t break other applications that have
already been
installed.

13. Application is installed via an OS service.

14. State management is maintained. In the past, it’s been difficult to know whether an application is installed on a machine. You would have
to query for

a .DLL with a specific version number or determine whether an .EXE file with
53

a specific name was present. Windows Installer provides an application programming interface (API) that lets programmers and
administrators see
whether a specific application is installed on a machine.

15. Scriptable API. This whips together a VBScript to help us with the MSI file manipulations. The API to manipulate MSI files is so
powerful that it can create, validate and update packages, trigger installs and uninstalls, examine the MSI repository data on computers, and
perform some custom actions.

16. Served installs. Because MSI files can be housed in a share point and delivered via a server, we can keep our installation files all in one
place or move them around — closer to the users if necessary

1.What are the ADDLOCAL and ADDSOURCE properties?

ADDLOCAL: It will install the components (file resources) associated with the feature locally on the client the package is installed on.

ADDSOURCE: The files will be “installed” on the source meaning where the MSI is originally located. There will actually not be any installation of files

into the folder but they must exists as “external uncompressed”.

2.Explain the difference between Property and PROPERTY?

Property: Private Properties in MSI (Properties that cannot be changed during runtime).

PROPERTY: Public Properties (Properties that can be changed during runtime).

3.Use of INSTALLLEVEL Property?


54

The INSTALLLEVEL property is the initial level at which features are selected “ON” for installation by default. A feature is installed only if the value in the

Level field of the Feature table is less than or equal to the current INSTALLLEVEL value. The installation level for any installation is specified by the

INSTALLLEVEL property, and can be an integral from 1 to 32,767.

4.What is the difference between Repair and self healing?

Self Heal and Repair are two different concepts in Windows Installer which people many times consider to be the same thing however there is difference

in these two.

Self Heal is triggered by advertised shortcuts, or other advertising information in the package which eventually Repairs the application.

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.

Repair of an MSI can be triggered by

 Repair button in Add/Remove programs

 Giving the command line msiexec /f{other option} {MSI name}

 Self Heal by advertised shortcut or other advertising information

 Active setup
55

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.

5.Custom Action conditions:


Requirement Condition

Action runs only during install NOT Installed AND NOT PATCH

Action only runs during removal of MSI REMOVE~=”ALL”

Action runs during install and reinstall only NOT REMOVE

Action runs during install and remove There must be no condition

6.Product code, Package Code and Upgrade code?

Product Code:

This code should only be changed if significant changes are made to the application – changes that warrant calling it a different product.

You change the product code when:

 The name of the .MSI file has been changed.

 The component code of an existing component has changed.

 A component has been removed from an existing feature.

 An existing feature has been made into a child of an existing feature.

 An existing child feature has been removed from its parent feature.
56

Note that adding a new feature (top level or child), consisting entirely of new components, does not require changing the product code.

Package Code:

As the name implies, the package code identifies a specific MSI file. I want to emphasize: not a product, but an MSI file. No two MSI files that are not

identical copies of each other should ever have the same package code, even if they install (different versions of) the same product. To change the

package code, go to the Summary Information Stream panel, put the cursor in the Package Code field, and press the “Generate GUID” button in the

lower part of the screen.

Upgrade Code:

All applications in a product family shared the same upgrade code. Such a group of related applications can consist of different versions and different

language versions of the same product. You should never change this code, unless you want to prevent major upgrades.

Summary

When to change the package, product and upgrade codes, and the product version.

Update Type Package Code Product Version Product Code Upgrade Code
Small update change don’t change don’t change don’t change
Minor update change change don’t change don’t change
Major upgrade change change change don’t change

7.Difference between Run, Run Once, Active Setup

Active Setup:
57

It is used when your application requires installation of components such as files or registry keys on a per-user basis, but application has no advertised

entry points or other triggers to initiate the installation process.

Run:

The Run key is processed after every logon, either by the Explorer shell, if it is present, or by First Boot Agent (FBA), if a custom shell, Command shell,

or Task Manager Shell is used. If FBA processes this key, it does so after every logon, not during first boot as it normally would. Typically, this flag is

used to load Systray applications, launch services in executables, hide autostart applications, or hide background processes

Run Once:

The RunOnce key is processed only once, by FBA, after Plug and Play device enumeration and DLL registration processing have completed. The values of

this registry key are deleted from the registry after it is processed, so that it will not run again. Typically, this flag is used when a reboot is required,

such as for a DLL or OCX registration, or for cleaning up a setup or an uninstall.

Logging
Once you have a problem with the Windows Installer or an MSI package ,you will be always thiking to “enable logging”.

In this post, I’ll discuss with you some of the basic tips about Logging ,Hope this will help you to be in a better position to troubleshoot package issues.

1.What is Logging

This is the process of putting different levels of activity of Windows Installer into text based log files.

2.What are all the general content in a log file


58

 Most errors that occurred during the install including all Windows Installer errors that generate a user dialog.

 Which custom actions were run.

 Whether a reboot was requested and completed.

 Values of Installer Properties, including details of any changes.

 The source location.

 Whether the user cancelled the install.

 Where an install stopped.

 Whether an install rolled back.

 Client and Server information

3.What is Verbose logging

When all options are turned on logging is generally called “verbose logging”

Eg : msiexec /I package.msi /l*v c:\test\log.log /qb

4.What is super verbose logging

When Loging is invoked with “x”, as in “-l*vx” on the command line it is termed as super verbose logging.

5.How ‘event Log’ will be helpful even though we create a Verbose log fie?

It is always worth a quick look to see if anything is logged particularly if trying to diagnose why Windows Installer “kicked in”, for example by a user

logging on or clicking a shortcut.


59

And badly written custom actions may write error details directly to the event log and not to the Windows Installer log.

5.What is the meaning of log return value 0,1,2,3?

A function could not be (or was not) executed


0

An action completed successfully.


1

A user canceled installation.


2

A fatal error.
3

7. What is the log return value 8

Another installation is already in progress. Only one installation at a time can run actions in the InstallExecuteSequence, AdminExecuteSequence, or AdvtExecuteSequence.
8

8. What is the command to translate Windows Error codes

Net helpmsg <error number>

Eg:net helpmsg 1

9. If you have an MSI wrapped up in an EXE (installsiled exe), then what is the method of turning on logging?

Setup.exe /v”/L*v c:\tmp\verbose.log”

10.How to turn on Windows installer logging via policies.


60

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer]

“Logging” = “voicewarmup”

“Debug” = dword:00000004

11. Wat is the return code of the installation 3010 means?

A restart is required to complete the install

12.What is wilogutl.exe

Wilogutl.exe assists the analysis of log files from a Windows Installer installation, and it displays suggested solutions to errors that are found in a log file.

13.How will you quickly identify the errors in a log

Simply searching for the phrase “Return Value 3” can be a quick way of pinpointing the errors in a log

14.What is a return value ?

This is an indicator of the success or otherwise of the action. Possible values are:

Value Meaning

0 Action was invoked, but did not run (not necessarily a bad thing, maybe there was nothing for it to do)

1 Action was a success

2 Action was cancelled by user

3 An unrecoverable error has occurred


61

4 The installation was suspended awaiting a reboot

15.What are all the ways to enable logging?

Command-Line

If you can install the MSI package from the command-line, even if only for troubleshooting, then this is a very easy way to generate a log. Simply use

the “/l” switch during install:

msiexec /i SomeApp.msi /l*vx %temp%\SomeApp.log

Using the “*vx” modifier gives the most detail possible

Registry or Group Policy

If you cannot run the package from the command-line, then enable logging directly in the registry or via Group Policy

MsiLogging and MsiLogFileLocation properties

With MSI 4.0 these two properties can be set in the Property table of a package to enable logging and specify the log location

Installer API

If you are developing an Installer-aware application, you can use the API to MsiEnableLog enable logging for the lifetime of the calling process.

1.when repackaging a legacy scripted installation (setup.exe) through setup capture,why should you exclude the

HKLM\software\microsoft\windows\currentversion\uninstall registry key if it is captured?

Every windows installer installation automatically creates its own values in this hive to support uninstallation

2.How do you set permissions on a folder without editing the LockPermissions table directly?
62

1.Write a custom action that executes to modify permission through the ACLs or Secedit.

2.Use permission tab for the create folder object (wise studio) or

Use properties of the folder (Installshield)

3.Which Custom action in MSI script (wise package studio) can use for nested installation.

Install MSI from Installation

4.Suppose Windows Installer installs package.msi ;package.msi has created a registry value, this registry value has been over writen by

some other application later.Will the registry key that is a keypath to a component be repaired when self healing is triggerd through the

short cut?

No, because regisrty value only are checked for selfhealing,not data in registry values.

5.Which process in re-packaging checks a windows installer database for consistance and compliance with microsoft best practices?

Package Validation

6.In wise package studio which INI file contains exclusion list?

Repackage.ini

7.What is the prefered method for customizing a vendor supplied MSI?

Create Transforms for customizations.


63

8.What is the industry defenition of a clean machine

Operating system and service packs only.

9.When you add a file to an installation that already exisits in another feature with the same file name ,which table the new file will be

added to?

Duplicate file

10.What is the best method to repackage Microsoft office.

Use Microsoft resource kit to create transforms.

11.Which installation sequence do you use to place custom actions that must run in the System context?

Execute Deffered

12.What is the best way to ensure all features of an MSI are installed during installation?

Set ADDLOCAL=ALL

13.What effect does a custom action with the synchronous processing option selected have on the installation?

Windows installer waits for the custom action to complete before continuing the main installation.

14.How will you identify public properties?

They are all uppercase.


64

15.Which condition in custom action enable that custom action to run during uninstall?

1.No condtion is necessary

2.REMOVE=”ALL”

1.How do you Customize the vendor MSI?

Vendor MSI’s should not be re-packaged or edited. Create a transform file to customize the vendor MSI.

 Some vendors supply utilities to customize their MSI behavior. Where this is the case, such utilities should be first considered as the appropriate

method of customizing the MSI. For example, use Microsoft’s Custom Installation Wizard to customize the Office XP suite.

2.When will you create a new MSI wrapper/ Wrapper Script?

This technique can be used in scenarios in which the installation program is not in MSI format and a setup capture is not appropriate.

Example: Service packs and security patches

3.How do you treat INI files while repackage an application?

 All INI files should keep in the INI file table, not installed as files. (File table)

 All hard coded paths within the INI files should be modified to use relative paths by fully utilizing Installer variables or custom Properties.

4.What is the best practice you follow while dealing with environment variable?

 Environment variables needs to modify in the Environment Table.


65

 All path variables needs to be appended (by indicating [~] in the value column of the Environment table), so that they do not overwrite existing

values and can be returned to their original state upon uninstall.

5.How do you create ODBC entries while repackaging?

It is best to create the ODBC entries through Control Panel/Administrative Tools/ODBC Data Sources. Capture the registry then add the keys to your

MSI package.

6.How do you treat auto update options in applications while you repackage?

This options should be completely disabled. Applications should not update themselves or prompt the user to update them. (Unless there is

a requirement to auto update)

7.What are the mandatory properties that required for every Installation?

1. Product Code

2. Product Language

3. Manufacturer

4. Product Version

5. Product Name

8.What are all the main Conflicts that should be resolved among the Packages?

 DLL files

 Registry Entries
66

 ODBC Resources

 Services

 Product Code / Package code

 File extensions

9.What is the issue with keeping Empty Key Value paths in registry?

Empty Key Value paths are not permitted due to registry removal problems when the MSI is uninstalled. To identify an empty key path the

value of the registry key is set to +.

10.What is the main advantage of using Naming Conventions?

This helps to uniquely identify a package in a Distributed Software Library or in a network share where we keep the package for distribution

and it support a unique standard too.

1.What is Autoexec.bat.What is the use of this?

AUTOEXEC.BAT is a system file found originally on the MS-DOS operating system. It is a plain-text batch file that is located in the root directory of the

boot device. The name of the file stands for “automatic execution”, which describes its function in automatically executing commands on system startup.

AUTOEXEC.BAT is read upon startup by all versions of DOS, including MS-DOS version 7.x as used in Windows 95 and Windows 98. Windows Me only

parses environment variables as part of its attempts to reduce legacy dependencies, but this can be worked around.

Under DOS, the file is executed once the operating system has booted and after the CONFIG.SYS file has been processed. Windows NT and its

descendants Windows XP and Windows Vista parse AUTOEXEC.BAT when a user logs on. As with Windows Me, anything other than setting environment
67

variables is ignored. Unlike CONFIG.SYS, the commands in AUTOEXEC.BAT can be entered at the interactive command line interpreter. They are just

standard commands that the computer operator wants to be executed automatically whenever the computer is started, and can include other batch files.

AUTOEXEC.BAT is most often used to set environment variables such as keyboard, soundcard, printer, and temporary file locations. It is also used to

initiate low level system utilities.

2.What is CONFIG.SYS file?

CONFIG.SYS is the primary configuration file for the DOS and OS/2 operating systems. It is a special file that contains setup or configuration

instructions for the computer system.

The commands in this file configure DOS for use with devices and applications in the system. The commands also set up the memory managers in the

system. After processing the CONFIG.SYS file, DOS proceeds to load and execute the command shell specified in the shell= line of CONFIG.SYS, or

COMMAND.COM if there is no such line. The command shell in turn is responsible for processing the AUTOEXEC.BAT file.

CONFIG.SYS is composed mostly of name=value statements which look like variable assignments. In fact these will either define some tunable

parameters often resulting in reservation of memory, or load files, mostly TSRs and device drivers, into memory.

3.What is System.ini file?

SYSTEM.INI was a basic INI file used in early versions of Microsoft Windows to load device drivers and the default Windows shell (Program Manager or

Windows Explorer). Many of these settings were honored in Windows 9x, although the files had begun to be phased out in favor of the Windows registry.

Windows XP still acknowledges some entries in the SYSTEM.INI file, to provide backwards compatibility with older 16-bit applications. However, when a

fresh install of XP is performed, the SYSTEM.INI file created is initially blank.


68

Microsoft bundles two specialized editors for core configuration files (such as WIN.INI, SYSTEM.INI, CONFIG.SYS, and AUTOEXEC.BAT) with its operating

systems. Sysedit is an MDI text editor that opens all of those files simultaneously, available in all versions of Windows since Windows 3.x. MSConfig is a

simpler application that allows a user to enable and disable drivers and applications from being loaded at startup by the aforementioned files and the

Run, RunEx, and RunOnce registry keys.

4.What is WIN.INI file?

WIN.INI is a basic INI file that was used in versions of the Microsoft Windows operating environment up to Windows 3.11 to store basic settings at boot

time. By default, all font, communications drivers, wallpaper, screen saver, and language settings were stored in WIN.INI by Windows 3.x. Many of these

settings were honored in Windows 9x, although the files had begun to be phased out in favor of the Windows registry. Windows XP still acknowledges

some entries in the WIN.INI file, to provide backwards compatibility with older 16-bit applications. However, when a fresh install of XP is performed, the

WIN.INI file created is initially blank. Also there is a WIN.INI file in Windows Vista.

Prior to Windows 3.0, it was not uncommon for applications to store their configuration settings inside WIN.INI. With the release of Windows 3.0 in

1990, Microsoft introduced the concept of “private” INI files, and some new application programming interface calls so that applications could store their

settings in their own files. Today Microsoft recommends using the registry for settings.

1.What is wise script editor?

WiseScript Editor is a separate script authoring environment that lets you create powerful .EXEs to use as custom actions in Windows Installer Editor.

Use this powerful feature to extend the capabilities of Microsoft Windows Installer and simplify installation tasks, such as parsing or arithmetic functions,

that are difficult to accomplish with Windows Installer.

2. What is the advantage of Creating an .EXE with WiseScript Editor compared to writing your own custom program to create an .EXE?
69

 WiseScript Editor has pre-created, easy-to-use script actions that have been specifically designed to fulfill common installation needs.

 You can pass Windows Installer properties in and out of the WiseScript Editor .EXE.

 Within a WiseScript Editor .EXE, you can evaluate Windows Installer conditions.

3.What is the disadvantage of using wise script?

The disadvantage to using WiseScript Editor is that Windows Installer does not know about or manage system changes performed by a WiseScript .EXE,

such as installation of a file.

4.How will you edit the script ?

Use the commands on the Edit menu, the right-click menu, or the tools on the toolbar to edit your script. You can edit only one script line at a

time, but you can cut, copy, or paste several lines at one time.

5.How will you comment out script lines?

1. Select the line or lines in the script that you want to disable.

2. Select Edit menu > Comment.

The commented lines appear in green. To reactivate commented lines,select them again and select Comment a second time.

6.Why we use conditionals and loops in script.Explain with an example?


70

Conditionals specify script actions that are executed only when certain conditions are satisfied. For example, in WiseScript, you can test what version of

Windows a destination computer is running, then execute different script actions depending on whether they.re running Windows 95/98/Me or Windows

NT4/2000/XP.

Loops are used to indicate actions that should be repeated until a certain condition is met. For example, you might prompt the end user to enter a

particular piece of information during installation. If you want to make sure that the information an end user enters meets certain criteria, you can use a

loop to repeat the prompt until the data entered is appropriate.

7.Wat are all the characteristics of variable?

 Variable names must begin with a letter.

 Variable names cannot begin with an underscore (_) character.

 Variable names can contain only numbers, letters, and underscore

 characters.

 Variable names must be 28 characters or less.

 They hold ASCII text, not binary data.

 They can be up to 32 KB in length.

8.What is the use of the item ‘Add Text to INSTALL.LOG’ ?

Use the Add Text to INSTALL.LOG script action to add commands to the installation log.

9.What is the use of the item ‘Add to AUTOEXEC.BAT’ ?


71

The Add to AUTOEXEC.BAT script action edits the AUTOEXEC.BAT file, which is executed during startup, to allow you to add commands that are executed

before Windows loads.

10.How will you append the existing autoexec.bat using

Once you open the window ,In line number section Enter zero to append the command to the end of the file

11. What is the use of the item ‘Add to CONFIG.SYS’?

The Add to CONFIG.SYS script action edits the CONFIG.SYS file to add new commands.

12. What is the use of the item ‘Add to SYSTEM.INI’?

The Add to SYSTEM.INI script action lets you add a device entry to the SYSTEM.INI file. If you use this command, Windows is restarted when installation

of the .MSI is complete, to force the new device driver to be loaded.

The setup.exe files generated with InstallShield support the creation and use of Response file\Answer files that can be used for silent Install\Uninstall of

applications. Here I’m sharing with you some of the information about this method.

What is a Response file?

A response file is a plain text file consisting of sections containing data entries.A response file contains information similar to what an end user would

enter as responses to dialog boxes when running a normal setup. InstallShield Silently reads the necessary input from the response file at run time. The

format of response files resembles that of an .ini file, but response files have .iss extensions. The best way to create an InstallShield Silent response file

is to run the setup and have InstallShield automatically record and create the response file. If necessary, the response file can be manually edited after

it is created.
72

Note

All passwords are saved in human readable form in the recorded silent setup file.

What are the Command line switches for Setup.exe?

/f1<path\ResponseFile> or -f1<path\ResponseFile>

Specifies an alternate location and name of the response file (.iss file). If this option is used when running InstallShield Silent, the response file is read

from the folder/file specified by<path\ResponseFile>. If this option is used along with the -r option, the response file is written to the folder/file specified

by<path\ResponseFile>.

/f2<path\LogFile> or -f2<path\LogFile>

Specifies an alternate location and name of the log file created by InstallShield Silent. By default, Setup.log is created and stored in the same directory

as that of Setup.exe.

/r or -r

Causes Setup.exe automatically to generate a silent setup file (.iss file), which is a record of the setup input.

/s or -s

Runs the setup silently.

Note
73

Separate multiple command line switches with a space, but do not put a space inside a command line switch (for example, /r /f1Install.iss is valid, but

not /r/f1 Install.iss).

When using long path and filename expressions with switches, enclose the expressions in double quotation marks. The enclosing double quotes tell the

operating system that spaces within the quotation marks are not to be treated as command line delimiters.

How to Create a response file?

1. Open a DOS window (Command Prompt).

2. Type the directory path of the Setup.exe. If spaces appear in the path, place quotes around the path. For example:

“C:\Test Response File\Setup.exe”

3. Type a space, then type the command line switches to use. For example:

“C:\Test Response File\Setup.exe” -r -f1C:\Install.iss

The above switches record a silent setup file to the file C:\Install.iss

Press Enter.

The Setup program runs.

4. Complete the installation or uninstallation process as you normally would.

All responses are recorded for use when Setup is run silently.

After the file is recorded, you can verify your responses by viewing the silent setup file in Notepad or Wordpad.

How to Install with the silent option ?

1. Open a DOS window (Command Prompt).


74

2. Type the directory path of the Setup.exe. If spaces appear in the path, place quotes around the path. For example:

“C:\Test Response File\Setup.exe”

3. Type a space, then type the command line switches to use. For example:

“C:\Test Response File\Setup.exe” -s -f1C:\Install.iss

The above switches read a silent setup file at the location C:\Install.iss

4. Press Enter.

Setup runs silently without asking for user feedback.

5. Verify the process was completed properly. For example, if you used Setup to install BMC Remedy, be sure BMC Remedy is running properly.

Note

A Setup run in silent mode uses the same settings as the Setup you ran through to create the response file. Essentially, you are creating clone

installations.

How to Troubleshoot errors ?

Setup.log is the default name for the silent setup log file that contains the results of the last run of a silent setup. This file is saved in the same location

as the recorded .iss file. The result code shown in the file is one of the following:

0 Success.

-1 General error.

-2 Invalid mode.
75

-3 Required data not found in the Setup.iss file.

-4 Not enough memory available.

-5 File does not exist.

-6 Cannot write to the response file.

-7 Unable to write to the log file.

-8 Invalid path to the InstallShield Silent response file.

-9 Not a valid list type (string or number).

-10 Data type is invalid.

-11 Unknown error during setup.

-12 Dialog boxes are out of order.

-51 Cannot create the specified folder.

-52 Cannot access the specified file or folder.

-53 Invalid option selected.

What are the component rules?


76

In order to ensure that authors of installation packages create packages that do not damage the components of other installations or
leave resources behind on uninstall, there are certain Component Creation Rules that must be followed when organizing applications into
components.

The commandments of component creation are as follows:

• Two components cannot install the same resource.

• Two components cannot have the same key path file.

• A component must be compatible with all previous versions of that component.

• All resources of a component must install to the same directory.

• There can only be one COM server per component.

• The COM server must be the key path.

• Only one file per component can be the target of a desktop or program menu shortcut.

1.What is the difference of the options ‘Reboot Operating System’ and ‘Reboot Computer System’ in Wise script.
77

Reboot Operating System

On Windows 9x or 3.1, this restarts Windows at the end of installation. On Windows NT4/2000/XP/2003 and later versions, this option logs the end user

out of Windows.

Reboot Computer System


78

Performs a full system reboot on the destination computer at the end of installation on all operating systems, if the end user has administrator

privileges. On Windows NT4/2000/XP/2003 and later versions, if the end user does not have administrator privileges, this option only logs the end user

out.

1.How do I make sure a complete uninstallation using a command


Use the property REMOVE
Eg: msiexec /x package.msi REMOVE =”ALL” /qb
2. How to set a property to an environment variable?
Use custom action of type 51 PropertyName and target [%EnvVarName] Eg: APP_PATH =[%PATH]
3.How to create an Internet (URL) Shortcut?
1.Create a URL file on your development computer and add this to a component.
2.Create a shortcut to point to this file.
The content of the .url can be like this:
[InternetShortcut]
URL=http://www.google.com
4. What are the limits for a large MSI package?
Reference: Windows Installer Team blog
There are a couple of limits that you may hit when authoring a large, complex MSI package.
Total number of files
If your Windows Installer package contains more than 32767 files, you must change the schema of the database to increase the limit of the following
columns: the Sequence column of the File table, the LastSequence column of the Media table, and the Sequence column of the Patch table. Note that
transforms and patches cannot be created between two packages with different column types.
Total number of components
The maximum number of rows for the Component table is 65536.
This limit was discovered by Danish Waheed and posted on the WiX users mailing list. It has been confirmed by a Microsoft employee but hasn’t been
officially documented yet.
Number of components per feature
There is a maximum limit of 1600 components per feature using Windows NT/Windows 2000 and a maximum limit of 800 components per feature using
79

Windows 95 and Windows 98. There will be a ICE47 validation warning if your package is above this limit.
Depth of Feature tree
There is a maximum limit of 16 for the depth of the feature tree. If you exeed this limit you get a runtime error message “2701. The Component table
exceeds the acceptable tree depth of 16 levels.” which is a bit misleading because the limit actually applyies to the Feature tree, not the Component tree (in
my understanding there is no component tree in MSI). In a test with a feature tree 20 levels deep msiexec.exe even crashed instead of displaying an error
message.
This limit has been reported by Danish Waheed on the WiX users mailing list. It doesn’t seem to be officially documented.
Number of disks or CAB files
For each disk or CAB file one row must be added to the Media table. Windows Installer packages are limited to a maximum of 80 Media table entries when
installed using Windows Installer prior to version 2.0. The restriction of 80 Media table entries was removed with Windows Installer version 2.0.
Limits of the CAB file format
The only compressed file type supported natively by Windows Installer is the Cabinet (CAB) format. The following limits apply to this file format.
No one file in a CAB can exceed 2GB
Maximum size of all files in one folder (compressed) 2GB
Maximum size of a CAB file (compressed) 2GB
Maximum number of files in a single CAB 64K
You can avoid these limits by splitting your setup into multiple CABs, possibly up to 64K * 2GB, or by placing your application files on the distribution disk
uncompressed.
Additional Limitations on Windows 95/98/Me
Windows Installer stores a lot of information about installed features and components in the registry. Because the size of a registry key is limited on
Windows 9X, the following approximate limits apply:
Registry values are limited to 16382 on Windows 98 and Windows Me, and limited to 16371 on Windows 95. This effectively limits the number of
components per feature to 817. The limit varies depending upon any additional space needed to accommodate optional parent features, which should
placed in the same value.
The total size of a registry key and all its values is limited to 64 KB on Windows 95 only. This can limit the maximum total number of features and
components in a product.
Windows Installer version 1.2 saves in-progress information as a registry value. This can limit the maximum number of features on Windows 95, Windows
98, and Windows Me. This limitation no longer exists with Windows Installer version 2.0 or later.
5.New and improved features in Windows Installer 4.5
80

* Multiple package transaction


* Embedded UI handler
* Embedded chainer
* Update supersedence resiliency
* Custom action execution on update uninstall

1.How do you Customize the vendor MSI?

Vendor MSI’s should not be re-packaged or edited. Create a transform file to customize the vendor MSI.

 Some vendors supply utilities to customize their MSI behavior. Where this is the case, such utilities should be first considered as the
appropriate method of customizing the MSI. For example, use Microsoft’s Custom Installation Wizard to customize the Office XP
suite.

2.When will you create a new MSI wrapper/ Wrapper Script?

This technique can be used in scenarios in which the installation program is not in MSI format and a setup capture is not appropriate.

Example: Service packs and security patches

3.How do you treat INI files while repackage an application?

 All INI files should keep in the INI file table, not installed as files. (File table)
 All hard coded paths within the INI files should be modified to use relative paths by fully utilizing Installer variables or custom
Properties.

4.What is the best practice you follow while dealing with environment variable?

 Environment variables needs to modify in the Environment Table.


 All path variables needs to be appended (by indicating [~] in the value column of the Environment table), so that they do not overwrite
existing values and can be returned to their original state upon uninstall.
81

5.How do you create ODBC entries while repackaging?

It is best to create the ODBC entries through Control Panel/Administrative Tools/ODBC Data Sources. Capture the registry then add the keys
to your MSI package.

6.How do you treat auto update options in applications while you repackage?

This options should be completely disabled. Applications should not update themselves or prompt the user to update them. (Unless
there is a requirement to auto update)

7.What are the mandatory properties that required for every Installation?

1. Product Code
2. Product Language
3. Manufacturer
4. Product Version
5. Product Name

8.What are all the main Conflicts that should be resolved among the Packages?

 DLL files
 Registry Entries
 ODBC Resources
 Services
 Product Code / Package code
 File extensions

9.What is the issue with keeping Empty Key Value paths in registry?

Empty Key Value paths are not permitted due to registry removal problems when the MSI is uninstalled. To identify an empty key
path the value of the registry key is set to +.
82

10.What is the main advantage of using Naming Conventions?

This helps to uniquely identify a package in a Distributed Software Library or in a network share where we keep the package for
distribution and it support a unique standard too.

Application Packaging Real Time Interview Questions And Answers -----------------------------------

1. What is Application Packaging?

Ans: Process of creating an installer for an application is called application packaging. Usually in it binary files provided by developers are packaged to form a package. The
Main difference between packaging and re-packaging is that the source files does not come in the form of package in packaging where as in re-packaging they come in a form
of a package, which might be MSI or legacy package (such as executable, batch files, etc).

2. What is Application Repackaging?

Ans: Repackaging (Customized Installation) is the process of capturing the changes made by an Installation Program (Package) and it is customized to support company
standards and distribution methods.
It is not necessary to do setup capture to call it repackaging, even creating must files or is files can be called application repackaging.

3. What are the steps of Repackaging?

Ans :
Ø Review the packaging requirements (User Requirement Review).
Ø Analyze the vendor package (Tech Review).
Ø Repackage the application (Setup capture).
Ø Customize the package (Scripting).
Ø Test the package (Testing & UAT).
Ø Release the package to end users (Deployment).

4. Why repackaging is required & what are the problems in Legacy Installation?

Most common reasons for Re-packaging are as follows

Ø Customized Installation.
Ø Reduce Support Costs.
Ø Self Repair.
Ø Source Resiliency.
Ø Unattended Install.

The problems with Legacy Installations.


83

Ø High Support Costs.


Ø Fragile Installs & uninstalls.
Ø Difficult & labor Intensive to deploy.

5. Name few MSI Packaging tools?

Ø Wise for Windows Installer.


Ø Wise Package Studio.
Ø Install Shield.
Ø SMS Installer.
Ø Marimba.
Ø WIX (It cannot be used for re-packaging).
Ø Sharpdevelop.
Ø Visual Studio.

6. Name few MSI Re-Packaging tools?

Ø Wise Package Studio


Ø Install Shield
Ø SMS Installer
Ø Marimba.

7. Name few Deployment tools?

Ø Radia
Ø CA DSM
Ø Altiris Client Management Suite
Ø Altiris Notification Server Console
Ø Microsoft Systems Management Server (SMS)

8. What is Windows Installer?

Windows Installer (previously known as Microsoft Installer) is a built-in Operating System service for Installing and Managing Applications. It provides a standard method for
developing, customizing, installing and updating applications. It is an engine for the installation, maintenance, and removal of software on modern Microsoft Windows
systems. The installation information, and often the files themselves, are packaged in installation packages, loosely relational databases structured as OLE COM Structured
Storages and commonly known as “MSI files”, from their default file extension. Windows Installer contains significant changes from its predecessor, Setup API. New features
include a GUI framework and automatic generation of the uninstallation sequence. It is positioned as an alternative to stand-alone executable installer frameworks such as
older versions of InstallShield and Wise Package Studio (later versions of both supports Windows Installer) and NSIS.

9. Benefits of the Windows Installer?

Ø Advertising
Ø Installation on Demand
Ø Repair (Self-healing)
Ø Rollback (Transactional operations)
84

Ø Managed Shared Resources

10. MSI Installation Mechanism (Background Mechanism)?

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.

11. 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.

12. Structure of MSI?

Ø Products (Collection of Features)


Ø Features (Collection of Components)
Ø Components (Collection of files and Registries)

13. What is Product?

A single, installed, working program (or set of programs) is a product. A product is identified by a unique GUID (the ProductCode property). A product is not the same as a
package: a single MSI package might install multiple different products. For example, an MSI might install French and English versions of a program, each of which is a
different product.

14. What is Feature?

Features are buckets for Components. Windows Installer configuration commands operate only on Features (installing, advertising, Uninstalling). Self-healing, installon-
demand and user profile fix-up operate at the Feature level.

15. 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.

16. What is self-healing?

When an MSI-based application is launched (by clicking on an advertised shortcut or file type association), Windows Installer checks the existence of key path items. If there
is a mismatch between the current system state and the value specified in the MSI package (e.g., a key file or registry is missing), then the related feature is reinstalled. This
85

process is also known as self-healing or self-repair.

17. What is the difference between Self-Healing and Repair?

Self Heal and Repair are two different concepts in Windows Installer which people many times consider to be the same thing however there is difference in these two.

Self Heal is triggered by advertised shortcuts, or other advertising information in the package which eventually Repairs the application.

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.

Repair of an MSI can be triggered by

Ø Repair button in Add/Remove programs


Ø Giving the command line msiexec /f{other option} {MSI name}
Ø Self Heal by advertised shortcut or other advertising information
Ø Active setup

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.

18. What is Registry, Tell the Structure & types of Registry?

The Registry is a single place for storing information about the Windows OS (Hardware & Software)

Ø Root Keys / Subtrees


Ø Subkeys
Ø Hives
Ø Entries

Types of Registry keys

Ø Machine-Specific (HKCR, HKLM, HKCC, HKU)


Ø User-Specific (HKCU, HKU)

Types of Registry Root keys

Ø HKEY_CLASS_ROOT (HKCR)
Ø HKEY_LOCAL_MACHINE (HKLM)
Ø HKEY_CURRENT_CONFIG (HKCC)
Ø HKEY_CURRENT_USER (HKCU)
86

Ø HKEY_USERS (HKU)

19. What are Shortcuts & Types?

Shortcuts are the entry points to the applications installed on the system which is normally points to a file:

Ø Advertised (File should be Installed by the Application).


Ø Non Advertised (File that is not part of Installation. It is also called Command Line shortcuts).

20. What are INI File & its format?

INI files are plain-text files that contain configuration information. "INI" stands for
initialization.
[Section]
Keyname=value.

21. What are Services & its types?

A windows service is a background process which is loaded by the Service Control Manager of the OS.

Ø 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).

22. Where is Service information stored?

Most of the Service information are stored under the windows registry hive “HKLM\System\CurrentControlSet\Name of the Service”

23. in the MSI, which tables contain information about the service details?

Ø Service Install (Service Details)


Ø Service Control (Controlling the service during Installation & Un Installation)

24. 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.
Ø System DSN (DSN will be available for all users)
Ø User DSN (DSN will be available for that particular user)

25. 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.
87

26. What is Environment Variable & its types?

Environment Variables are the variables that are set by the Operating System & Application.
Ø System Variable (Available for all users)
Ø User Variable (Available for that particular user)

27. What is Property & types of Properties, give some Examples?

Properties are global variables that the Microsoft Windows Installer uses during an installation.

Private: The installer can be use only internally (values can’t be changed during the run time).

Manufacture, ProductCode, ProductID, ProductName, ProductVersion ……

Public: The installer can be uses both internally & externally (values can be changed during the run time also).

INSTALLLEVEL, ….

Restricted Public: The user can’t change the value both internally & externally due to security purposes. ALLUSERS, REBOOT, REINSTALLMODE …

28. What is Merge Module?

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.

29. Name few Merge Module tables?

v ModuleSignature,
v ModuleComponents,
v ModuleDependency,
v ModuleExclusion,
v ModuleIgnore,
v ModuleSubstitution,
v ModuleAdminUISequence,
v ModuleAdminExecuteSequence,
v ModuleConfiguration,
v ModuleAdvtUISequence,
v ModuleAdvtExecuteSequence,
v ModuleInstallUISequence,
v ModuleInstallExecuteSequence.

30. Detail the Background mechanism of Merge Module?

If there are a number of applications that require a specifically configured component, it would be possible to create a merge module that installs and
configures that component. That merge module could then be added to the installation packages of each product that required that particular component.
88

This saves the effort of having to individually add the necessary files, registry entries, and other components to every installation. It also saves time if updates are needed, as
instead of updating the installations for all five applications, only the merge module is updated, and the installations only need to be rebuilt.

31. How to give Permission for files, folders & Registry keys in MSI?

In the MSI, we can give permissions through Lock Permission table. But using subinacl.exe custom action is the best way to set permissions.

32. 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 <file name> [/T] [/E] [/C] [/G user: perm] [/R user [...]] [/P user: perm [...]]
[/D user [...]] “
/T Changes ACLs of specified files in the current directory and subdirectories
/E Edit ACL instead of replacing it
/C Continue (ignore) access denied errors
/G user: perm where access rights granted can be: R C F (read, change, full control)
/R user Revoke specified user's access rights (only valid with /E)
/P user: perm Replace specified user's access rights. Permission can be: N R C F (none, read, change, full control)
/D user Deny specified user access
E.g. “cacls c:\myfile.txt /E /G <user name>: F”

33. How to install only one particular feature during the Installation through Command line?

msiexec /i <msi> ADDLOCAL=<Feature Name>


34. How to disable ARP (Add/Remove Programs) Details during the Insallation through Command line, tell some ARP properties?

msiexec /i <msi> ARPSYSTEMCOMPONENT=1


Following entries are various ARP properties

a) ARPAUTHORIZEDCDFPREFIX
b) ARPCOMMENTS
c) ARPCONTACT
d) ARPINSTALLLOCATION
e) ARPNOMODIFY
f) ARPNOREMOVE
g) ARPNOREPAIR
h) ARPPRODUCTICON
i) ARPREADME
j) ARPSIZE
k) ARPSYSTEMCOMPONENT
89

l) ARPURLINFOABOUT
m) ARPURLUPDATEINFO

35. 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

Ø 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.

Ø Publishing :

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.

36. What is Advertised Feature & Component?

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.

37. What is Installation on Demand?

When a user or application activates an advertised feature or product, the installer proceeds with installation of the needed components.

38. 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.

39. What are the types of Transform?

a) Embedded transform
Embedded transforms are stored inside the .msi file of the package.

b) Secured transform
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.

c) Unsecured transform
Transforms that have not been secured are called unsecured transforms. To apply an unsecured transform, pass the transform file names in the TRANSFORMS property or
command line string during the installation.
90

40. How to Create Transform in Wise / Install Shield?

In Wise Package Studio, by using Install Tailor or New Project ? other templates ?
Transform In Install Shield Admin Studio, by using the New Project ? Transform

41. How many Transform can be created for one Vendor MSI?

There is no restriction on the numbers of transforms which can be created for one Vendor MSI.

42. How many Transforms can be supplied in the Command line?

There is no restriction on the numbers of transforms which can be supplied in the command line .

43. What is Custom Action?

The Microsoft Windows Installer provides many built-in actions for performing the installation process. For some cases the developer writes an action to execute his own
installation is called custom action.

44. What are the types of Custom Actions?

v DLL file stored in a Binary table stream


v DLL file that is installed with a product
v EXE file stored in a Binary table stream
v EXE file that is installed with a product
v Displays a specified error message and returns failure, terminating the installation
v EXE file having a path specified by a property value
v EXE file having a path referencing a directory
v JScript file stored in a Binary table stream
v JScript file that is installed with a product
v JScript text specified by a property value
v JScript text stored in this sequence table
v VBScript file stored in a Binary table stream
v VBScript file that is installed with a product
v VBScript text specified by a property value
v VBScript text stored in this sequence table
v Property set with formatted text
v Directory set with formatted text
v Installation of a package nested inside of the first package. See Nested Installation Actions
v Installation of a package that resides in the first application’s source tree. See Nested Installation
v Actions
v Installation of an application that is advertised or already installed. See Nested Installation Actions.

45. What are the types of Sequences in the Custom Actions?


91

v Normal User Interface


v Normal Execute Immediate / Deferred
v Administrative User Interface
v Administrative Execute Immediate / Deferred

46. What are the types of Conditions in the Custom Actions and what is the use?

v Not Installed - During Installation only


v REMOVE - During Un Installation only
v NOT REMOVE - During both Install & Un Install

47. What are the types of In Script options in the Custom Actions?

a) 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).

b) Deferred Execution – User Context


Deferred custom actions can only be sequenced between the Install Initialize and Install Finalize 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 Install Execute, Install Execute Again, or Install Finalize action is run. If the Current User doesn’t have the elevated privileges (Custom actions make changes in the
system directly), the custom actions should run in Deferred Execution in User Context only.

c) Rollback only
This Action should be executed during the Installation of the Rollback script or if the Installation is Unsuccessful.

d) Commit only
This Action should be executed during the Installation of the Commit script.

e) Deferred Execution – System Context

Deferred custom actions can only be sequenced between the Install Initialize and Install Finalize 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 Install Execute, Install Execute Again, or Install Finalize 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.

48. What is the difference between “Immediate Execute / Deferred Execute”?

Ø Immediate custom actions, can be sequenced anywhere within any of the sequence tables
Ø Deferred custom actions can only be sequenced between the Install Initialize and Install Finalize actions in execute sequence tables
Ø Immediate custom actions have access to the Installation database
Ø Deferred custom actions doesn’t have access to the Installation database
Ø 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.
92

49. What is the difference between “Deferred in System Context / Deferred in User Context”?

Ø 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”.

50. What are the types of Processing Options in the Custom Actions and what is the use?

A) 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.

b) 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.

c) A synch, 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.

d) A synch, 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.

51. What are the types of Scheduling Options in the Custom Actions and what is the use?

A) Always Execute: This action execute in all sequences


b) Run first time: This action execute only the first time Windows Installer encounters it.
c) 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.
d) Run only if UI sequence was run: This action execute only if either Execute sequence is run following User Interface sequence.

52. What is Launch Condition?

Launch Condition is used to check system requirements on the destination computer.

53. What is App Search?

App Search action is used to search for existing versions of products (Files, Registry, INI, Directory & Component)

54. What is Isolated Component, why we are using and its types?

It means that to prevent overwriting of previous versions of shared components, and ensures that other applications do not overwrite your version of shared components.

A) Manifest file concept


b) Local file concept

55. What is the use of MSI Assembly tables?


93

Ø It is used for the registration of .Net Assembly files

56. What is the latest version of Windows Installer?

Ø The latest version of Windows Installer is 4.5

57. What is the latest version of Wise Package studio & Install Shield Admin Studio?

Will change with time.

58. What is the difference between Wise Package Studio & Install Shield Admin Studio?

Need to find the info myself.

59. What is Conflict Management?

When two or more applications install the same system files (DLLs, .VBXs, and .OCXs), Windows registry, and other items. To detect, Conflict Management should be use and
for resolve the software conflicts, Application Isolation concept should be use.

60. What are the types of Deployment (Software Distribution)?

Ø Group policy (Active Directory)


Ø Software Update Services (SUS)
Ø Windows Update Web site
Ø Systems Management service (SMS)

61. What is Software Distribution?

One of the more critical aspects to managing a Windows environment is the ability to deploy new applications, updates, upgrades & patches. Distributing new or updated
software is called as Software Distribution.

62. What is Group Policy (GPO) & how to set it?

Administrators use Group Policy to define options for managing, configuration of servers, desktops, and groups of users. It is used to set policies across a given site, domain,
or range of organizational units. Use “gpedit.msc” in the run command to set the policy.

63. What is Elevated User & how to create it?


94

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

Type: DWORD Key: Always Install Elevated Value: 1

64. What is Wrapper MSI?

Ø When an Executable is wrapped within an MSI then that msi is called wrapper msi

65. What is Lock down environment?

Software restriction policies provide administrators with a Policy-driven mechanism to identify software running on computers in a domain, and control its ability to execute.
This policy can be used to block malicious scripts, help lockdown a computer, or prevent unwanted applications from running.

66. What is IntelliMirror?

Intelli Mirror management technologies are 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.

67. What is Active Directory?

Deploying applications through the Active Directory is done through the use of group policies, and therefore applications are deployed either on a per user basis or on a per
computer basis.

68. What are the other tools which are used during the testing & finding solving the Issues in the Application Packaging?

Ø Picture Taker
Ø Windows Install Master
Ø InstallRite
Ø RegMon
Ø FileMon
Ø procmon
Ø Process Explorer
Ø CsDiff
Ø Icon Extractor & Icon Builder
Ø RegExtractor
Ø WiLogUtl
Ø WiseComReg

69. What is Orca tool & what is the purpose and Advantages?

Microsoft utility to view, update, validate MSI & MST files.

70. Why multiple MSI Exec is running during the Installation?

Windows Installer uses a client-server model for performing installations. Additionally for security reasons, Windows Installer hosts DLL and script custom actions in a
95

"sandbox" process. Depending on how the install was initiated, one of the MSIExec processes can be the client process (Current User). Another MSIExec process Windows
Installer service (System).

71. 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” or you can
useINDSTALLDRIVE=C:\

72. 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 thepackage code is changed.

73. 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.

74. What are the types of Upgrades and what is the difference?

a) 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 featurecomponent structure for the package. Only the package code is changed. It is also called as a "Hotfix" or “Quick Fix Engineering (QFE)”.

b) 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 featurecomponent
structure for the package. The package code & product version is changed for the product. It is also called as a “Service Pack”.

c) 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 featurecomponent
structure for the package. The package code, product code & product version is changed for the product. It is also called as a "Product Upgrade”.

75. How you validate the MSI using Wise Package Studio?

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.

76. What is ICE?

It means “Internal Consistency Evaluation”. ICEs are used to validate installation packages against various generic issues.

77. 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:

a) ICE03 - Basic data and foreign key validation


b) ICE18 - Validates the KeyPath column of the Component table when it is NULL.
c) ICE21 - Validates that all components in the Component table map to a feature in
96

the FeatureComponents table.


d) ICE33 - Checks for entries in the registry table that belong in other tables.
e) ICE38 - Validates that components installed under the user's profile use a registry key under HKCU as their key path.
f) ICE64 - Checks that new directories in the user profile are removed in roaming scenarios.
g) ICE57 - Validates that individual components do not mix per-machine and peruser data.
h) ICE59 - Checks that advertised shortcuts belong to components that are installed by thetarget feature of the shortcut.

78. What are the File types of Application Packaging?

Ø WSI - Microsoft Windows Installer Project file


Ø ISM - Install Shield Project file
Ø MSI - Microsoft Windows Installer
Ø MST - Microsoft Transform
Ø PCP - Windows Installer Patch Project file
Ø MSP - Microsoft Windows Installer Patch
Ø WSM - Microsoft Windows Installer Merge Module Project file
Ø MSM - Microsoft Windows Installer Merge Module
Ø EXE - Executable file

79. How to install the .Exe file through silent mode?

Its mostly /s, but will depend up on which tool has been used to create it.

80. How to register the DLL manually?

By using the command line option “regsvr32”. For example


Ø regsvr32 Dll name For Register the Dll
Ø regsvr32 /u For Unregistered the Dll
Ø regsvr32 /s For Silent register

81. What is COM Component?

Ø Component which is having the COM information

82. What are the default Windows Installer properties?

Ø [AdminToolsFolder]
C:\Document and Settings\Current User\Start Menu\Programs\Administrative Tools\
Ø [AppDataFolder]
C:\Document and Settings\Current User\Application Data\
Ø [CommonAppDataFolder]
C:\Document and Settings\All Users\Application Data\
Ø [CommonFilesFolder]
C:\Program Files\Common Files\
Ø [DesktopFolder]
C:\Documents and Settings\Current User\Desktop\
Ø [FavoritesFolder]
97

C:\Documents and Settings\Current User\Favorites\\


Ø [FontsFolder]
C:\Windows\Fonts\
Ø [LocalAppDataFolder]
C:\Documents and Settings\Current User\Local Settings\Application Data\
Ø [MyPicturesFolder]
C:\Documents and Settings\Current User\My Documents\My Pictures\
Ø [NetHoodFolder]
C:\Documents and Settings\Current User\NetHood\
Ø [PersonalFolder]
C:\Documents and Settings\Current User\My Documents\
Ø [PrintHoodFolder]
C:\Documents and Settings\Current User\PrintHood\
Ø [ProfilesFolder]
C:\Documents and Settings\Current User\
Ø [ProgramFilesFolder]
C:\Program Files\
Ø [ProgramMenuFolder]
C:\Documents and Settings\Current User\Start Menu\Programs\
Ø [RecentFolder]
C:\Documents and Settings\Current User\Recent\
Ø [SendToFolder]
C:\Documents and Settings\Current User\SendTo\
Ø [StartMenuFolder]
C:\Documents and Settings\Current User\Start Menu\
Ø [StartupFolder]
C:\Documents and Settings\Current User\Start Menu\Programs\Startup\
Ø [System16Folder]
C:\Windows\System\
Ø [SystemFolder]
C:\Windows\System32\
Ø [TempFolder]
C:\Documents and Settings\Current User\Local Settings\Temp\
Ø [TemplateFolder]
C:\Documents and Settings\Current User\Templates\
Ø [WindowsFolder]
C:\Windows\
Ø [WindowsVolume]
C:\

83. What are the default Environment settings in XP?

Ø ALLUSERSPROFILE
C:\Documents and Settings\All Users
Ø APPDATA
C:\Documents and Settings\current User\Application Data
Ø CommonProgramFiles
C:\Program Files\Common Files
98

Ø COMPUTERNAME
System Name
Ø ComSpec
C:\Windows\system32\cmd.exe
Ø HOMEDRIVE
C:
Ø HOMEPATH
C:\Documents and Settings\Current User
Ø ProgramFiles
C:\Program Files
Ø SystemDrive
C:
Ø SystemRoot
C:\Windows
Ø TEMP
C:\Documents and Settings\Local Settings\Temp
Ø TMP
C:\Documents and Settings\Local Settings\Temp
Ø USERNAME
Current User
Ø USERPROFILE
C:\Documents and Settings\Current User
Ø Windir
C:\Windows

84. What is Package Code?

The Package Code is a GUID identifying a particular Microsoft Windows Installer package. It associates an .MSI file.

85. What is Product Code?

The Product Code is a GUID identifying a particular Application or product.

86. Tell some complex Applications you did & what is the Issue and how you solve the Issue?

Provide few of your complex applications such as Office, etc

88. What are the disadvantage/drawbacks of MSI?

Resiliency: Resiliency can be inconsistent with repackaged applications because the repackager utility may not fully understand the component dependencies or what the key
paths of the application should be. Therefore, an application may be packaged into one large feature that gets entirely reinstalled if a component keypath is missing. If it were
broken up into multiple smaller features it would enable a more manageable resiliency. COM/ActiveX

Registration: Component Object Model (COM) and ActiveX controls may not be properly registered. Prior to Windows Installer, COM and ActiveX registration was a black box.
Except for the exported functions DLLRegisterServer and DLLUnregister server, COM and ActiveX controls offered very few hints of their registration process. RegSvr32.exe
was responsible for calling the previously mentioned functions and then the DLL was responsible for registering itself. There is no utility that can view a DLL, an OCX, or an
EXE and figure out what goes on inside DllRegisterServer and DllUnregisterServer for that file. There are standard registry entries that most COM and ActiveX controls
99

register, such as HKCR\CLSID, HKCR\ProgID, and HKCR\TypeLib. Information on COM registration may or may not get entered into the appropriate MSI tables by the
repackager.

Shortcuts: Shortcuts may not be created as Windows Installer descriptor shortcuts, which enable resiliency. Legacy setup shortcuts were .lnk files that pointed to an
executable in most cases. Sometimes when the repackager runs, all it knows is that an .lnk file was copied to a directory. For example, a legacy Setup.exe installed a shortcut
to C:\Windows\Profiles\User1\Desktop. The repackager would copy the .lnk file directly to the directory listed previously. Therefore, the repackager is not actually copying a
Windows Installer shortcut, but rather it is copying a file without any resiliency capabilities included.

Isolated Components: The only way to take advantage of isolated components is to author a new MSI package. Repackagers currently do not support this feature. Application
Removal:When uninstalling a repackaged application, it is possible that the AllUsers profile.

89. What is advertisement and Command for 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.

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.

Publishing: 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.

Syntax

Ø msiexec /j [{u|m}] package


Ø msiexec {u|m} package /t TransformList
Ø msiexec {u|m} package /g LanguageID

Parameters

Ø /j : Advertises a product.
Ø u : Advertises to the current user.
Ø m : Advertises to all users of the computer.
Ø package : Specifies the Windows Installer package file.
Ø /g LanguageID : Identifies the language.
Ø /t TransformList : Applies transform to advertised package.

90. What is admin install and Command for it?


The Windows Installer can perform an administrative installation of an application or product to a network for use by a workgroup. An administrative installation installs a
source image of the application onto the network that is similar to a source image on a CD-ROM. Users in a workgroup who have access to this administrative image can then
install the product from this source. A user must first install the product from the network to run the application. The user can choose to run-from-source when he installs and
the installer uses most of the product's file directly from the network. Administrators can run an administrative installation from the command line by using the /a command
line option. The ADMIN action is the top-level action used to initiate an administrative installation. When this action is executed the installer calls the actions in the
AdminExecuteSequence and AdminUISequence tables to perform the administrative installation.

Syntax: Msiexec /a package


100

91. For which type of packages admin install fail?

Any MSI which installs files based on selection, be it from command line, System Search or selected options while installing.

92. What is Transaction processing?

One or more operations processed together as a single indivisible whole called a transaction. All the constituent operations must succeed for the transaction to succeed,
otherwise all the operations are rolled back to the original state.

Windows Installer 4.5 includes support for installing multiple packages using transaction processing. The packages are chained together and processed as a single
transaction. If one or more of the packages in the transaction cannot be installed successfully or if the end user cancels the installation, the Windows Installer initiates
rollback for all of the packages to restore the system to its earlier state.

93. How to apply multiple transforms to MSI?

msiexec /i <msifile> transforms=”mst1.mst”, “mst2.mst”, “mst3.mst” /q

94. MSI installation is failing with 1603, what might be the cause?

The following is a non-exhaustive list of known causes for this error:

Ø Short file name creation is disabled on the target machine.


Ø An Install Script custom action is prototyped incorrectly.
Ø A file is locked and cannot be overwritten.
Ø The Microsoft Windows Installer Service is not installed correctly.
Ø The Windows Temp folders are full.
Ø The setup was corrupted after installation and, therefore, fails with this error during un-installation.
Ø An older version of Install Shield Developer is being used.
Ø A general error occurred during the installation.
Ø Print and File sharing is not installed or enabled when installing MSDE 2000.

95. How can we find whether source files contain MSI or not?

Ø If Msiexec engine process runs more than 2 times in taskmanager


Ø If package keeps entry of MSI in temp folder

96. What are the types of Setup Captures in Wise / Install shield?

In Wise Package Studio there are three types

Ø Virtual Capture: Creates a clean virtual OS on your computer, and the installation is redirected in the clean virtual OS.
Ø SmartMonitor: 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.

In Install Shield there are two types


101

Ø 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.

97. What is Dll Cache folder?

It is the folder in which Microsoft Windows stores protected system files.

98. What are the ADDLOCAL and ADDSOURCE properties?

ADDLOCAL: It will install the components (file resources) associated with the feature locally on the client the package is installed on.
ADDSOURCE: The files will be “installed” on the source meaning where the MSI is originally located. There will actually not be any installation of files into the folder but they
must exists as “external uncompressed”.

99. Explain the difference between Property and PROPERTY?

Property: Private Properties in MSI (Properties that cannot be changed during runtime).
PROPERTY: Public Properties (Properties that can be changed during runtime).

100. Use of INSTALLEVEL Property?

The INSTALLLEVEL property is the initial level at which features are selected “ON” for installation by default. A feature is installed only if the value in the Level field of the
Feature table is less than or equal to the current INSTALLLEVEL value. The installation level for any installation is specified by the INSTALLLEVEL property, and can be an
integral from 1 to 32,767.

101. What is the difference between Repair and self healing?

Self Heal and Repair are two different concepts in Windows Installer which people many times consider to be the same thing however there is difference in these two.

Self Heal is triggered by advertised shortcuts, or other advertising information in the package which eventually Repairs the application.

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.

Repair of an MSI can be triggered by

• Repair button in Add/Remove programs


• Giving the command line msiexec /f{other option} {MSI name}
• Self Heal by advertised shortcut or other advertising information
• Active setup

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.

102. Custom Action conditions?


102

Requirement -----------------------------------------------------------------------------------------Condition

Action runs only during install --------------------------------------------------------------------NOT Installed AND NOT PATCH
Action only runs during removal of MSI ---------------------------------------------------------REMOVE~=”ALL”
Action runs during install and reinstall only ----------------------------------------------------NOT REMOVE
Action runs during install and remove -----------------------------------------------------------There must be no condition

103. Product code, Package Code and Upgrade code?

This code should only be changed if significant changes are made to the application – changes that warrant calling it a different product.

You change the product code when:

v The name of the .MSI file has been changed.


v The component code of an existing component has changed.
v A component has been removed from an existing feature.
v An existing feature has been made into a child of an existing feature.
v An existing child feature has been removed from its parent feature.

Note that adding a new feature (top level or child), consisting entirely of new components, does not require changing the product code.

Package Code:

As the name implies, the package code identifies a specific MSI file. I want to emphasize: not a product, but an MSI file. No two MSI files that are not identical copies of each
other should ever have the same package code, even if they install (different versions of) the same product. To change the package code, go to the Summary Information
Stream panel, put the cursor in the Package Code field, and press the “Generate GUID” button in the lower part of the screen.

Upgrade Code:

All applications in a product family shared the same upgrade code. Such a group of related applications can consist of different versions and different language versions of the
same product. You should never change this code, unless you want to prevent major upgrades.

Summary:

When to change the package, product and upgrade codes, and the product version.

Update Type---------------- Package Code ------------Product Version ---------Product Code ------------------------Upgrade Code

Small update --------------------Change -----------------------Don’t change ----------------Don’t change ----------------------------Don’t change


Minor update --------------------Change -----------------------Change -----------------------Don’t change ----------------------------Don’t change
Major upgrade ------------------Change -----------------------Change -----------------------Change -----------------------------------Don’t change

104. Difference between Run, Run Once, Active Setup?

Active Setup:

It is used when your application requires installation of components such as files or registry keys on a per-user basis, but application has no advertised entry points or other
103

triggers to initiate the installation process.

Run:

The Run key is processed after every logon, either by the Explorer shell, if it is present, or by First Boot Agent (FBA), if a custom shell, Command shell, or Task Manager Shell
is used. If FBA processes this key, it does so after every logon, not during first boot as it normally would. Typically, this flag is used to load Systray applications, launch
services in executables, hide autostart applications, or hide background processes

Run Once:

The RunOnce key is processed only once, by FBA, after Plug and Play device enumeration and DLL registration processing have completed. The values of this
registry key are deleted from the registry after it is processed, so that it will not run again. Typically, this flag is used when a reboot is required, such as for a DLL or OCX
registration, or for cleaning up a setup or an uninstall.

105. What is Windows Installer?

Windows Installer is a system service for installing and managing applications. It provides a standard method for developing, customizing, installing, and updating
applications.

106. What basic functionality is provided by Windows Installer?

A. Windows Installer provides the following basic functions:

Transactional operations: All installation operations are transactional. For each operation that Windows Installer performs, it generates an equivalent undo operation that
would undo the change made to the system. If a failure occurs during the middle of an installation, Windows Installer can roll back the
machine to its original state.

Self-healing: Windows Installer supports "self-healing" abilities for applications. Applications can detect common installation problems at launch, like missing files or registry
keys, and automatically repair themselves.

Installation on demand: Windows Installer supports on-demand installations of application features. For example, the spelling checker in Microsoft Office Word may not be
installed by default, but a user can trigger an on-demand installation of this feature.

Installation in locked-down environments: In fully locked-down environments, users don't generally have permission or the ability to install applications. In most cases, they
don't have write-access to the Program Files folder of their computers or to the HKEY_LOCAL_MACHINE registry location. If an administrator approves an installation package
by means of Group Policy, for instance, Windows Installer can perform an installation on the user's behalf.

State management: Windows Installer provides a set of standard Win32® application programming interfaces (APIs) and automation interfaces for applications and
administrators to use for querying the installation state on the machine. The APIs allow querying of the current state, verification of the
existing state, repair of a corrupted state, and transition from one state to another.

107. What versions of Windows include Windows Installer?

Microsoft Windows 2000, Windows Millennium Edition (Windows Me), and Windows XP include Windows Installer. Windows 2000 includes version 1.1 of Windows Installer,
Windows Me includes version 1.2, and Windows XP includes version 2.0.
Windows 2000 SP3 also contains version 2.0 of Windows Installer.
104

108. Why are multiple MSIExec.exe processes running on my machine during an installation?

A number of MSIExec processes can be running during an installation. The reason for this is that 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.

Another MSIExec process is Windows Installer service. Any remaining MSIExec processes are usually sandbox processes for hosting custom actions. The determination as to
which MSIExec process will serve as the sandbox process for a script or DLL custom action depends in part on whether the custom action will run elevated or impersonated
and whether the custom action is 32-bit or 64-bit.

109. What is an MST, and why it is used?

A. Whenever there is a vendor supplied MSI, then it is not recommended to do capture the MSI, hence all the changes need to be done in the MSI are done is a Microsoft
Transform. Then this MST file is applied on the MSI with the following command line.

MSIEXEC /I {path}\file.msi TRANSFORMS={path}\file.mst /q

Where {path} is the location of the folder where MSI and MST are kept.

110. 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.

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 asa 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 feature-component structure for the package. Significant changes can be made to the feature-component structure in the scope of a major
update.

111. What is the Logical structure of package?

A package describes the installation of a full product (Windows Installer does not handle dependencies between products) and is universally identified by a GUID. A product is
made up of components, grouped into features.

Components:

A component is the minimal part of a product—each component is treated by Windows Installer as a unit: the install developer cannot, for example, use a
condition to specify to install just part of a component. Components can contain files,groups of files, directories, COM components, registry keys, shortcuts, and other data.
The end user does not directly interact with components.
105

Components are identified globally by GUIDs, thus the same component can be shared among several features of the same package or multiple packages, ideally through the
use of merge modules (although, for this to work correctly, different components should not share any sub-components).

Key paths:

A key path is a specific file, registry key, or ODBC data source that the package author specifies as critical for a given component. Because a file is the most common type of
key path, the term key file is commonly used. A component can contain at most one key path; if a component has no explicit key path, the component's destination directory is
taken to be the key path.

When an MSI-based application is launched, Windows Installer checks the existence of these critical files or registry keys (that is, the key paths). If there is a mismatch
between the current system state and the value specified in the MSI package (e.g., a key file is missing), then the related feature is re-installed. This process is also known as
self-healing or self-repair. No two components should use the same key path.

Features :

A feature is a hierarchical group of components—a feature can contain any number of components and other features (a feature contained in another feature is called a
"subfeature"). Most installation programs display a "custom setup" dialog box at run time, from which the end user can select which features to install or remove.

The package author defines the product features. A word-processing program, for example, might provide features for the main program executable, the program's help files,
and optional spelling checker and stationery modules.

112. How to do Diagnostic Logging?

A. Windows Installer supports detailed logging as a powerful diagnostic tool. Logging can be enabled in the following four ways:

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

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.

Group Policy: The following Group Policy setting can be used to manage logging on

multiple systems: Computer Configuration -> Administrative Templates -> Windows Components -> Windows Installer -> Logging.

Windows Installer API: If installing an MSI package programmatically, the MsiEnableLog function call can be used to create a log file and determine the logging level for the
life of the calling process. Although verbose logs are very useful for diagnosing Windows Installer problems, they can be very long and difficult to read without practice. A
106

quick way to find the location of a problem in the log is to open it in a text editor (such as Notepad) and search for the phrase "Return Value 3".

This entry commonly appears in logs close to the point where a critical error has occurred. The Windows Installer SDK provides a tool called WiLogUtl, which parses and
annotates Windows Installer log files.

113. Why does the package go for Self Healing first time the user launches the Application?

If the package is containing some HKCU entries then the package will always go for self healing for the first time. This happens because the HKCU keys are only installed for
the current user present while installing the package and not all the users as it is the property of the HKCU. So, if other user logs in then there is a mismatch between the
current system state and the value specified in the MSI package (e.g., a key file is missing), then the related feature is re-installed. This is called the Self Healing.

114. How do detect the MSI Version on the Computer?

If you want to check the version of the Windows Installer on your system, check the version of MSI.DLL in the Windows\System 32 folder.

115. Advantages of Packaging (creating MSI packages)?

1. Customize Applications to suit the user needs.

2. Simplify the Installation and Un-installation Procedures.

3. Saves Time in both Installation and Un-installation.

4. Once packaged, applications can be quickly installed on a range of desktops in multiple locations, saving administrative costs, simplifying the manage of
licensing fees and minimizing support and repair expenditures.

5. Saves Space of the product by doing apt modifications to applications.

6. Has a great flexibility of obtaining the lost files through a phenomenon called Self Heal, this reduces the down time of application. If a critical file (a .DLL or
.EXE file, for example) that is part of the distribution is corrupt or is deleted, the user can be prompted to repair the installation by presenting the original
.MSI distribution. Additionally, if the installation media is available (for example, on a network share), the repair simply happens automatically.

7. Can be advertised. So that on demand installation could take place.

8. Upgrading of the application can be done with ease.

9. Clean installation and Un-Installation is achieved by a process called Roll- Back.

10. Simplifies management of new user set-up along with the revision and distribution of software repairs and new applications to existing users. Application recovery can
also be improved.

11. Helps eliminate uncontrolled software downloads and installation, enables applications to be safely removed and reduces non-business traffic on a
corporate network.

12. Using .MSI format, can automate software distribution process and ensure that the installation doesn’t break other applications that have already been
installed.
107

13. Application is installed via an OS service.

14. State management is maintained. In the past, it’s been difficult to know whether an application is installed on a machine. You would have to query for

a .DLL with a specific version number or determine whether an .EXE file with

a specific name was present. Windows Installer provides an application programming interface (API) that lets programmers and administrators see
whether a specific application is installed on a machine.

15. Scriptable API. This whips together a VBScript to help us with the MSI file manipulations. The API to manipulate MSI files is so powerful that it can create, validate and
update packages, trigger installs and uninstalls, examine the MSI repository data on computers, and perform some custom actions.

16. Served installs. Because MSI files can be housed in a share point and delivered via a server, we can keep our installation files all in one place or move them around —
closer to the users if necessary.

116. About Applying Custom VB Actions in Real Time ?

Tracking Analyst supports the use of custom Visual Basic (VB) actions with real-time data in ArcMap. The custom VB action differs from other real-time actions in that it is
applied to data in ArcMap at the layer level, rather than in ArcCatalog, where actions are applied to services. The VB action will be applied to real-time data as it streams into
ArcMap but not to any data already in the layer prior to triggering the action.

You can access the Visual Basic Editor (VBE) from the Main menu in ArcMap to create this action. The following procedure takes you through the steps of applying a VB action
to a real-time data layer as it streams into ArcMap.

For more information on applying actions to real-time data at the server level, see the book Using Tracking Server.
Once you have saved a temporal layer as a .lyr file, its action settings are read-only.

117. How To Applying Custom VB Actions in Real Time?


Procedure

1. In the Arc Map table of contents, right-click the real-time data layer to which you want to apply the VB action and click Properties.
2. Click the Actions tab.
3. Click New Action.
4. Click in the Name the Action text box and type a name for the action.
5. Click Visual Basic as the type of action to create.
6. Click OK.
7. Click the Project drop-down arrow and choose Project or Normal.
8. A macro in the Normal folder will affect all documents opened in Arc Map.
9. Click the Module drop-down arrow and choose the appropriate module for the macro.
10. The default module name in VBE is This Document.
11. Click the Macro drop-down arrow and choose the name of the macro you want to use.
12. Click the appropriate button for the kind of query you want to build.
13. Click Query Builder to load or create a query for the action.
14. All features meeting the criteria defined in the query will be affected by the VB action you have created.
15. Click OK.
108

16. The new action appears in the list panel on the Actions tab.
17. Click OK to apply the new action to the specified layer and close the dialog box.

You might also like