Professional Documents
Culture Documents
Yes
How to hide the entry of installed msi application in Add/Remove Programs section of
Control Panel?
By setting the property ARPSYSTEMCOMPONENT=1
1
o Applications containing system files managed by the Windows File Protection features of
Windows 2000 and later are also to be avoided, such as Internet Explorer, Windows
Service Packs and certian hotfixes.
All these applications are hard coded to use the Windows Installer service, and may make calls
back to certain locations within the original MSI package.
o Virtual Capture : Creates a clean virtual OS on your computer, and the installation is
redirected in the clean virtual OS.
o SmartMonitor : Watches the installation and records the changes the installation
performs.
o Snapshot : Scan the computer before and after the installation and record the
differences between the first scan and the second.
o Execution
The installer passes the information to a process with elevated privileges and runs the
script.
2
o Rollback
If an installation is unsuccessful, the installer restores the original state of the computer.
When the installer processes the installation script, it simultaneously generates a rollback
script. In addition to the rollback script, the installer saves a copy of every file it deletes
during the installation. These files are kept in a hidden, system directory. Once the
installation is complete, the rollback script and the saved files are deleted.
What is a MSI?
MSI is “Microsoft Windows Installer”. It is an installation, in the form of a single file. It is actually a
database that contains several tables (80+). Each of these tables contains instructions and set-up
information. In wise there are 120 (87+33) tables.
Structure of MSI?
o Products (Collection of Features)
o Features (Collection of Components)
o Components (Collection of files and Registries)
What is Product?
Product is an Application.
What is Feature?
Features are buckets for Components. Windows Installer configuration commands operate only on
Features (installing, advertising, Uninstalling). Self-healing, install-on-demand and user profile fix-
up operate at the Feature level.
What is Component?
Components are collections of resources that are always installed or removed as a unit from a
user's system. A resource can be a file, registry key, shortcut, or anything else that may be
installed. Every component is assigned a unique component code GUID.
Structure
Root Keys / Subtrees
Subkeys
Hives
Entries
Types
Machine-Specific (HKCR, HKLM, HKCC, HKU)
User-Specific (HKCU, HKU)
Root Keys
HKEY_CLASS_ROOT (HKCR)
HKEY_LOCAL_MACHINE (HKLM)
HKEY_CURRENT_CONFIG (HKCC)
HKEY_CURRENT_USER (HKCU)
HKEY_USERS (HKU)
3
Keyname=value
o Win32 Service (Win32 services are the services which is running by the executable file
installed by the Application).
o System or Kernel Services (Kernel services are the services which are used by the OS
to communicate to the hardware devices).
In the MSI, which tables contain information about the service details?
o ServiceInstall (Service Details)
o ServiceControl (Controlling the service during Installation & UnInstallation)
o Private
The installer can be use only internally (values can’t be changed during the run time).
Manufacture, ProductCode, ProductID, ProductName, ProductVersion
……
o Public
The installer can be uses both internally & externally (values can be changed during the
run time also).
INSTALLLEVEL, ….
o Restricted Public
The user can’t change the value both internally & externally due to security purposes.
ALLUSERS, REBOOT, REINSTALLMODE …
4
REBOOT (Force, Suppress, ReallySuppress)
Always prompt for a reboot at the end of the installation.
Suppress prompts for a reboot at the end of the installation. But the user can still
prompt by using ForceReboot action.
Suppress all prompts for reboots during the installation.
5
t - Applies transform to advertised package
/a - Administrative Installation
/x - UnInstalls a product
o Restart Options
/norestart - Do not restart after the
Installation
/promptrestart - Prompts the user for restart
if necessary
/forcerestart - Always restart the computer
after Installation
o Logging Options (Writes logging information into a logfile at
the specified existing path. Default is 'iwearmo')
/l - I - Status messages
w - Nonfatal warnings
e - All error messages
a - Start up of actions
r - Action-specific records
u - User requests
c - Initial UI parameters
m - Out-of-memory or fatal exit information
o - Out-of-disk-space messages
p - Terminal properties
v - Verbose output
x - Extra debugging information
+ - Append to existing log file
! - Flush each line to the log
* - Log all information, except for v and x
options
/ log <LogFile> Equivalent of /l* <LogFile>
o Update Options
/update
/uninstall
/p - Applies a Patch
6
/f p - only if file is missing
o - If file is missing or an older
version is installed (default)
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 <file name> [/T] [/E] [/C] [/G user: perm] [/R user [...]] [/P user: perm [...]] [/D user [...]] “
7
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
What is VB Script?
VB Script is a Microsoft Scripting language that means it is a lightweight programming language. It
is a light version of Microsoft's programming language Visual Basic. It is used to add interaction for
the web page projects.
How to install only one particular feature during the Installation through Command line?
msiexec /i <msi> ADDLOCAL=<Feature Name>
How to disable ARP Details during the Installation through Command line, tell some ARP
properties?
msiexec /i <msi> 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
By default, only Administrators and System will be able to modify these settings.
SFCDisable (REG_DWORD)
0 = enabled (default).
8
1 = disabled, prompt at boot to re-enable (debugger required).
2 = disabled at next boot only, no prompt to re-enable (debugger required).
SFCScan (REG_DWORD)
0 = do not scan protected files at boot (default).
1 = scan protected files at every boot.
2 = scan protected files once.
SFCQuota (REG_DWORD)
n = size (in megabytes) of dllcache quota.
FFFFFFFF = cache-protected system files on the local hard drive.
SFCShowProgress (REG_DWORD)
0 = System File Checker progress meter is not displayed.
1 = System File Checker progress meter is displayed (default).
SFCDllCacheDir (REG_EXPAND_SZ)
Path = local location of dllcache directory (default is %Systemroot%\system32\dllcache).
What is Advertisement?
It means that, the Availability of an application to users or others with out actually the full
Installation. There are two types of Advertising
o Assigning
An Application appears (shortcuts, files & registries) to a user or others, when an
Application is “assigned”. When the user tries to open, it is installed upon demand.
o Publishing
No Entry points appear to a user or others, when an Application “published” to the group.
It is activated only if the group Application activates the published Application i.e.
Installation on Demand.
What is 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.
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
9
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.
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
If the Current User doesn’t have the elevated privileges (Custom actions make changes in
the system directly), the custom actions should run in Deferred Execution in User Context
only.
o Rollback only
This Action should be executed during the Installation of the Rollback script or if the
Installation is Unsuccessful
o Commit only
This Action should be executed during the Installation of the Commit script.
10
installation database. Deferred custom actions are not executed immediately. Instead they
are scheduled to run
later during the execution script. The execution script isn't processed until the
InstallExecute, InstallExecuteAgain, or InstallFinalize action is run.
If the Current User have the elevated privileges (Custom actions make changes in the
system directly), then it should run in Deferred Execution in System Context only.
What is the difference between “Immediate Execute / Deferred Execute” in the Custom
Actions?
o Immediate custom actions, can be sequenced anywhere within any of the sequence
tables
Deferred custom actions can only be sequenced between the InstallInitialize and
InstallFinalize actions in execute sequence tables
o Immediate custom actions have access to the Installation database
Deferred custom actions doesn’t have access to the Installation database
o Immediate custom actions can only run in the User Context
Deferred custom actions can run both in the context of the user and elevated using the
system context.
What is the difference between “Deferred in System Context / Deferred in User Context” in
the Custom Actions?
If the Custom action which installs or modify a file under the INSTALLDIR or Installation should be
run in “Deferred in User Context”
If the Custom action which installs or modify the system file directly should be run in “Deferred
Execution in System Context”
What are the types of Processing Options in the Custom Actions and what is the use?
o Synchronous
Windows Installer runs the custom action synchronously to the main installation. It waits
for the custom action to complete successfully before continuing the main installation.
o 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.
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
11
Launch Condition is used to check system requirements on the destination computer
When installing assemblies to the global assembly cache, the installer cannot use the same
directory structure. Assemblies can exist only once in the assembly cache. Assemblies are added
and removed from the assembly cache atomically
What is the latest version of Wise Package studio & Install Shield Admin Studio?
Wise Package Studio - 6.0
Install Shield - 10.5
Install Shield Admin Studio - 6.0
You can create through “gpedit.msc” in the run Command or registry keys
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer
Type : DWORD Key: AlwaysInstallElevated Value : 1
12
What is Lock down environment?
Software restriction policies provide administrators with a
Policy-driven mechanism to identify software running on computers in a domain, and control its
ability to execute.
This policy can be used to block malicious scripts, help lockdown a computer, or prevent unwanted
applications from running.
What is IntelliMirror?
IntelliMirror management technologies is a set of powerful
features for change and configuration management. It ensures that users’ data, software, and
personal settings are available when they move from one computer to another, and persist when
their computers are connected to the network.
Microsoft divides IntelliMirror's features into the following four categories:
o User Data Management :. IntelliMirror supports the mirroring of user data to the network
and local copies of selected network data.
o 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
13
Why multiple MSIExec is running during the Installation?
Windows Installer uses a client-server model for performing installations. Additionally for security
reasons, Windows Installer hosts DLL and script custom actions in a "sandbox" process.
Depending on how the install was initiated, one of the MSIExec processes can be the client
process (Current User). Another MSIExec process is Windows Installer service (System).
Which drive your Application will Install, C drive has less space and D drive has more
space? Why & how to solve?
It will install “D” drive only due to Windows Installer features.
We can solve by adding “WindowsVolume” entry in the directory table as parent of “TARGETDIR”
What is a Patch?
Patching is a streamlined process for updating earlier versions of a Windows Installer setup
package i.e. when you update only files that already exist in your installation package. Only the
package code is changed.
What is Upgrade?
Upgrade is a process of updating the earlier versions of a Windows Installer setup package i.e.
Adding, changing & deleting new Files & Registries. But here product code, product version &
package code should be changed.
o Minor Upgrade
A minor update is a product update that makes enough changes. But there is a limitation
for the changes that can be made to the feature-component structure for the package. The
package code & product version is changed for the product. It is also called as a “Service
Pack”.
o Major Upgrade
A major update is a product update with a large number of changes. There is no limitation
for the changes that can be made to the feature-component structure for the package. The
package code, product code & product version is changed for the product. It is also called
as a "Product Upgrade”.
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
14
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.
o [AdminToolsFolder]
C:\Document and Settings\Current User\Start Menu\Programs\Administrative Tools\
o [AppDataFolder]
C:\Document and Settings\Current User\Application Data\
o [CommonAppDataFolder]
C:\Document and Settings\All Users\Application Data\
o [CommonFilesFolder]
C:\Program Files\Common Files\
o [DesktopFolder]
C:\Documents and Settings\Current User\Desktop\
o [FavoritesFolder]
C:\Documents and Settings\Current User\Favorites\\
15
o [FontsFolder]
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:\
16
C:\Windows
o TEMP
C:\Documents and Settings\Local Settings\Temp
o TMP
C:\Documents and Settings\Local Settings\Temp
o USERNAME
Current User
o USERPROFILE
C:\Documents and Settings\Current User
o Windir
C:\Windows
About Manifests
Application manifests are XML files that describe an isolated application. This descriptive
information includes the relationship between the application and its dependent files.
For example, if the application was HelloWorld.exe, the manifest file is called:
HelloWorld.exe.manifest
Assembly manifests are XML files that describe an application's assemblies. This includes
components such as DLLs.
Information stored in the assembly manifest, such as COM registration information, ProgIDs,
etc., is usually stored in the Registry. However, by making it independent from the Registry,
only that application can use the dependent files described in the manifest. This enables you
to have multiple versions of the same DLL or other portable executable file on a system
without generating compatibility conflicts.
For example, if the component was Goodbye.dll, the manifest file is called:
Goodbye.dll.manifest
17
Manifests as New Components
When you create manifests, Repackager supports putting them into new components. If you
do not select the Create new component for each assembly option on the Manifest Options tab
of the Isolation Options dialog box, the manifest will be added to the same component as the
assembly.
InstallShield 11.5
With Reg-Free COM, COM data is written to an application manifest file that is stored in the
application folder. The manifest file is an XML file that contains information about an
application and the libraries that are associated with it. Note that the Reg-Free COM manifest
file, the executable file, and the COM libraries should all be installed to the same folder on the
target machine.
Reg-Free COM has several advanages over traditional COM. For example, with Reg-Free COM,
the component is defined within the scope of the application itself. Even if other applications
that use the same COM component or a different version of it require that it be registered, it
will not interfere with this application.
Problems may occur with traditional COM registration if multiple versions of shared libraries
exist on a target system. For example, an installation may overwrite a new version of a shared
library with an older version, or a new version might not be backwardly compatible with older
versions. This may cause applications that require features of a specific version to crash. These
types of situations are commonly known as DLL Hell. With Reg-Free COM, you can avoid these
problems because other applications cannot access your application's COM component.
In addition, Reg-Free COM streamlines the upgrade and uninstallation processes. For an
upgrade, simply replace the application folder. For an uninstallation, simply remove that folder.
Reg-Free COM is not appropriate for some solutions. Several limitations exist:
Concept: Conflict Solving is a process (one of the best practices) which finds out conflict
between more than two applications for various resource such as Files, Registries, Services, INI
Files, Environment Path Variable, ODBC, Extensions, COM information (internal information of
DLL, OCX or EXE file) etc. These resources are critical for any application to run successfully.
18
Conflict Solving ensures the shared common resources do not get uninstalled from the
machine when it is being used by more than one applications.
For example, if we install package A on machine and then package B on the same machine. If
a file called common.dll is being using by both the application, un-installation of any of these
applications will remove the file from the machine hence breaking all other applications.
Conflict solving synchronises commonly used resource across the package and ensures un-
installation of any application does not break any other application. It also ensures version
conflict of same file to run more than one applications on the same machine at the same time.
Conflict Solving Method: Following are the activities required for conflict solving.
1. Setup and Configure a database (SQL Server). This database has various folders which
stores package in progress, in peer test, exception and certified.
2. Import MSI (Package) into database. Database has same table structure as any MSI to store
information of a package. This database keeps increasing with packages which are certified
and delivered.
3. Conflict Solving Software (part of Admin Studio) given by Install Shield (Microvision) is used
to conflict solve a application against whole database.
4. Generate a conflict report for packager.
5. Packager needs to analyse and fix conflict. Once conflict solving is done it goes in same
iteration until all conflict solved. This conflict solving is done on package project (InstallShield
Project).
19