Professional Documents
Culture Documents
1 - Application Packaging Interview Quwations
1 - Application Packaging Interview Quwations
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 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
* 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.
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)
* 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 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 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 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
* 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 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 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 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 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
* 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
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
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
* Transforms
The installation process can be manipulated by applying transforms (.mst) to the installation database. A transform makes changes
to elements of the database. For example, Windows Installer can use a transform file to change the language in the user interface
of an application. The Windows Installer transform files modify the installation package file at installation time, and can therefore
dynamically affect the installation behavior.
Customization transforms, much like patches, remain cached on the computer. These transforms are applied to the base package
file whenever Windows Installer needs to perform a configuration
change to the installation package. Transforms are applied at initial installation; they cannot be applied to an already installed
application.
Transforms
.mst file
Secure, unsecure, embeded
defualt -unsecure (can modify)
20
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.
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.
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.
The following command-line script would advertise the "Sports" feature and install the "News" feature to run from source.
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.
• 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.
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
InstallExecuteSequence
Before Initialization
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
Answer :
o Wise Package Studio
o Install Shield
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).
o ModuleComponents,
o ModuleDependency,
o ModuleExclusion,
o ModuleIgnore,
o ModuleSubstitution,
o ModuleAdminUISequence,
o ModuleAdminExecuteSequence,
o ModuleConfiguration,
o ModuleAdvtUISequence,
o ModuleAdvtExecuteSequence,
o ModuleInstallUISequence,
o ModuleInstallExecuteSequence.
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.
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
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
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
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.
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
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.
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.
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
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
Property: Private Properties in MSI (Properties that cannot be changed during runtime).
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
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.
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.
Action runs only during install NOT Installed AND NOT PATCH
Product Code:
This code should only be changed if significant changes are made to the application – changes that warrant calling it a different product.
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
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
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
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,
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.
Most errors that occurred during the install including all Windows Installer errors that generate a user dialog.
When all options are turned on logging is generally called “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
And badly written custom actions may write error details directly to the event log and not to the Windows Installer log.
A fatal error.
3
Another installation is already in progress. Only one installation at a time can run actions in the InstallExecuteSequence, AdminExecuteSequence, or AdvtExecuteSequence.
8
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?
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer]
“Logging” = “voicewarmup”
“Debug” = dword:00000004
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.
Simply searching for the phrase “Return Value 3” can be a quick way of pinpointing the errors in a log
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)
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
If you cannot run the package from the command-line, then enable logging directly in the registry or via Group Policy
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
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
3.Which Custom action in MSI script (wise package studio) can use for nested 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
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
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.
15.Which condition in custom action enable that custom action to run during uninstall?
2.REMOVE=”ALL”
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.
This technique can be used in scenarios in which the installation program is not in MSI format and a setup capture is not appropriate.
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?
All path variables needs to be appended (by indicating [~] in the value column of the Environment table), so that they do not overwrite existing
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
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
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
This helps to uniquely identify a package in a Distributed Software Library or in a network share where we keep the package for distribution
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
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
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.
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
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
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.
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,
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.
The disadvantage to using WiseScript Editor is that Windows Installer does not know about or manage system changes performed by a WiseScript .EXE,
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.
1. Select the line or lines in the script that you want to disable.
The commented lines appear in green. To reactivate commented lines,select them again and select Comment a second time.
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
characters.
Use the Add Text to INSTALL.LOG script action to add commands to the installation log.
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
Once you open the window ,In line number section Enter zero to append the command to the end of the file
The Add to CONFIG.SYS script action edits the CONFIG.SYS file to add new commands.
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
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.
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.
/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
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
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.
2. Type the directory path of the Setup.exe. If spaces appear in the path, place quotes around the path. For example:
3. Type a space, then type the command line switches to use. For example:
The above switches record a silent setup file to the file C:\Install.iss
Press Enter.
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.
2. Type the directory path of the Setup.exe. If spaces appear in the path, place quotes around the path. For example:
3. Type a space, then type the command line switches to use. For example:
The above switches read a silent setup file at the location C:\Install.iss
4. Press Enter.
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.
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
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.
• 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
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.
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.
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
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.
This technique can be used in scenarios in which the installation program is not in MSI format and a setup capture is not appropriate.
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?
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
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.
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).
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.
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?
Ø Customized Installation.
Ø Reduce Support Costs.
Ø Self Repair.
Ø Source Resiliency.
Ø Unattended Install.
Ø Radia
Ø CA DSM
Ø Altiris Client Management Suite
Ø Altiris Notification Server Console
Ø Microsoft Systems Management Server (SMS)
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.
Ø Advertising
Ø Installation on Demand
Ø Repair (Self-healing)
Ø Rollback (Transactional operations)
84
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.
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.
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.
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.
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.
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
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.
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.
The Registry is a single place for storing information about the Windows OS (Hardware & Software)
Ø HKEY_CLASS_ROOT (HKCR)
Ø HKEY_LOCAL_MACHINE (HKLM)
Ø HKEY_CURRENT_CONFIG (HKCC)
Ø HKEY_CURRENT_USER (HKCU)
86
Ø HKEY_USERS (HKU)
Shortcuts are the entry points to the applications installed on the system which is normally points to a file:
INI files are plain-text files that contain configuration information. "INI" stands for
initialization.
[Section]
Keyname=value.
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).
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?
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)
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
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)
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).
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 …
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.
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.
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.
33. How to install only one particular feature during the Installation through Command line?
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
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.
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.
When a user or application activates an advertised feature or product, the installer proceeds with installation of the needed components.
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.
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
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.
There is no restriction on the numbers of transforms which can be supplied in the command line .
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.
46. What are the types of Conditions in the Custom Actions and what is the use?
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).
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.
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.
Ø 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?
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.
57. What is the latest version of Wise Package studio & Install Shield Admin Studio?
58. What is the difference between Wise Package Studio & Install Shield Admin Studio?
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.
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.
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.
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
Ø When an Executable is wrapped within an MSI then that msi is called wrapper msi
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.
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.
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?
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:\
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.
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.
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:
Its mostly /s, but will depend up on which tool has been used to create it.
Ø [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
Ø 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
The Package Code is a GUID identifying a particular Microsoft Windows Installer package. It associates an .MSI file.
86. Tell some complex Applications you did & what is the Issue and how you solve the Issue?
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.
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
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.
Any MSI which installs files based on selection, be it from command line, System Search or selected options while installing.
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.
94. MSI installation is failing with 1603, what might be the cause?
95. How can we find whether source files contain MSI or not?
96. What are the types of Setup Captures in Wise / Install shield?
Ø Virtual Capture: Creates a clean virtual OS on your computer, and the installation is redirected in the clean virtual OS.
Ø 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.
Ø 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.
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”.
Property: Private Properties in MSI (Properties that cannot be changed during runtime).
PROPERTY: Public Properties (Properties that can be changed during runtime).
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.
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.
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.
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
This code should only be changed if significant changes are made to the application – changes that warrant calling it a different product.
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
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
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.
Windows Installer is a system service for installing and managing applications. It provides a standard method for developing, customizing, installing, and updating
applications.
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.
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.
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.
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.
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.
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:
Windows Registry: The following registry value can be used to enable verbose logging:
Key: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
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.
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.
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.
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.
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
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.
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.
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.