Академический Документы
Профессиональный Документы
Культура Документы
advantages of packaging?
Ans: a) Easy deployment and maintenance
b) Self repair of applications
c) Remote installation
d) Applications will not conflict with each other plus avoiding system crash
e) Web deployment is possible.
Packaging process?
Ans: tech review of given setup.exe- setup capture scripting the wsi file obtained by setup
capturecompiling and generating msi package validating msi and debugging errorsconflict
management and deployment.
4
Repackaging hardware is problematic at best, the consensus seems to be that the creation of a
custom action which performs the hardware installation via an INF file is the way to go.
30) What are the system requirements for install on demand features?
Ans: Self repair only works with the “Desktop Update” from Microsoft, that means the shell32.dll
needs to be version 4.72.3110.0 or higher.
The application must also be launched from the Advertised Icon created by the MSI package- running
the executable from File Manager or creating your own shortcut (.LNK) will bypass the Install-on-
demand or repair process of the Windows Installer.
• 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.
5
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.
34) What are the differences between a 'deferred' custom action and an 'immediate' custom
action?
Ans: 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.
35) When should I use a deferred custom action instead of an immediate custom action?
Ans: Deferred custom actions should be used when the custom action must make a change to the
system or call another system service. Additionally, only deferred custom actions can run in an
elevated context. If your custom action requires elevated privileges in order to run, your custom action
needs to be marked as deferred.
Note: Custom actions marked to run in the system context (msidbCustomActionTypeInScript +
msidbCustomActionTypeNoImpersonate) will only run in the system context if the installation itself is
elevated.
Additionally, when making a change to the system by means of a custom action, you should also
include a rollback custom action that can undo the change.
36) What are the differences between small, minor, and major updates?
Ans: 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.
6
37) How can I figure out why my package fails to install?
Ans: There are three good troubleshooting methods for tracking down package installation problems.
The first method is to ensure that your package is valid by running validation. Validation helps catch
common installation authoring problems by identifying errors and warnings. Two tools can be used for
validating an installation package, both are available in the Windows Installer SDK: MsiVal2 and
Orca. MsiVal2 is a command line utility for validating a package. Orca provides a graphical user
interface for validation and will also highlight invalid entries in the package.
The second method is to use the application event log. Windows Installer will record successful and
failed installation information in the application event log.
The final method is to generate a verbose log file, and then analyze the verbose log file looking for
the source of the error. A helpful utility for analyzing verbose log files is the WILogUtl.exe tool
provided in the Windows Installer SDK. Logging can be enabled via Windows Installer logging policy
or by appending "/L*v path to logfile" to your MSIExec command line.
To generate a detailed verbose log file through policy, use the following registry key:
• HKLM\Software\Policies\Microsoft\Windows\Installe
r
Log files generated through the policy key will be of the form msiXXXXX.log in the user's %temp%
folder.
Note: Logging through the command line overrides any logging policy settings.
38) Every time I launch my application, Windows Installer performs an installation. How can I
determine the cause of the on-demand installation?
Ans: An easy way to determine the cause of an on-demand installation is to look in the application
event log for MsiInstaller log messages of the form:
Event Type: Warning
Event Source: MsiInstaller
Event ID: 1001
Description:
Detection of product '{000C1109-0000-0000-C000-000000000046}', feature 'Example' failed during
request for component '{00030829-0000-0000-C000-000000000046}'
Event Type: Warning
Event Source: MsiInstaller
Event ID: 1004
Description:
Detection of product '{000C1109-0000-0000-C000-000000000046}', feature 'Example', component
7
'{00030829-0000-0000-C000-000000000046}' failed. The resource 'C:\Progam
Files\example\example.exe' does not exist.
The first message (with event ID 1001) states which component was being installed. The component
listed here is the component named in the Component_ column of the Shortcut table for the particular
shortcut.
The second message (with event ID 1004) indicates which component failed detection. Improved
event logging in Windows Installer 2.0 has updated the message so that in most cases, the message
identifies the actual resource that resulted in the failed detection. The component with the missing or
damaged keypath is the component that is triggering the reinstallation.
In the example above, the reinstallation is triggered because the resource 'c:\Program
Files\example\example.exe' does not exist. You would then need to find out why the keypath does
not exist—in this case, the user deleted it.
39) How can I determine whether Windows Installer installed my feature or component?
Ans: Determining whether Windows Installer installed a particular feature or component is fairly easy.
The answers can be found in a Windows Installer verbose log file. The first thing to look for is the
logging of the InstallValidate action. This action will log the installed, request, and action states of
each feature and component in the installation package.
MSI (s) (5C:F4): Doing action: InstallValidate
Action start 1:51:18: InstallValidate.
MSI (s) (5C:F4): Feature: Example; Installed: Absent; Request: Local; Action: Local
MSI (s) (5C:F4): Component: Example; Installed: Absent; Request: Local; Action: Local
Action ended 1:51:18: InstallValidate. Return value 1.
In the log file snippet shown above, the "Example" feature will be installed locally since its action state
is local. Furthermore, the component "Example" will also be installed locally given its action state.
• None of the components to which these files belong have component GUIDs. (The value for the
component in the ComponentId column of the Component table is NULL). Components without
GUIDs are not managed by Windows Installer.
• If the keypath of the component has a shared DLL refcount, then the component will not be
uninstalled.
• If the component is installed in the system folder and at the time of uninstallation there is an
external shared DLL refcount for any one file in the component, then the component will not be
uninstalled.
8
CreateFolder table and CreateFolders action are used.
• The folders were not created by Windows Installer, therefore it will not remove them unless
told to do so.
42) Why are my registry keys not being removed during uninstallation?
Ans: The most common causes for leaving behind registry keys during uninstallation are:
1 The Registry table contains entries marked with the '+' sign. This directs the installer to leave
. behind those registry keys during uninstallation.
43) Why is the disk space consumed by the installation so much larger than the actual sizes of
the files I am installing?
Ans: Windows Installer calculates two types of space consumption: the space consumed with
rollback, and the space consumed without rollback. The space consumed without rollback is the
actual disk space consumed by the installation. The space consumed with rollback will include the
space of the backup files necessary for supporting rollback during the installation. Additionally,
Windows Installer calculates some of the overhead required for performing the installation. Included
in the overhead is the space required for the installation script and the space requirements of the
cached package. Furthermore, the installer runs from a temporary copy of the installation package
during the installation. Both the space requirements of the installation script and the space
requirements of the running copy of the package are temporary. These files are cleaned up after
installation. Consider the following example where your installation package is around 80 kilobytes
(KB) in size and you are installing a 4 KB file (Note: your numbers may vary depending on the cluster
size of your hard drive):
89120 bytes (cached MSI, rounded to nearest cluster size of 4 KB)
89120 bytes (temporary working copy of MSI)8192 bytes (estimated script size)
4096 bytes (small file, rounded to disk cluster size of 4 KB)
----------------------
176128 bytes = 172 KB
9
MSI (s) (DC:DC): Doing action: InstallValidate
Action start 19:55:42: InstallValidate.
…
Info 1603. The file d:\test\sample.exe is being held in use by the following process: Name:
sample.exe, Id: 4068, Window Title: 'Sample'. Close that application and retry.
Normally, this message coincides with the presentation of the FilesInUse dialog box. In silent UI
cases, this dialog box will not be presented. Additionally, not all files that are in use will show up in the
FilesInUse dialog box. The FilesInUse dialog box may not be displayed if the files in use are not
executables, the process holding the files is the process invoking the installation, or the process
holding those files is one that does not have a window title associated with it.
The FileCopy opcode in the install script can also log the 1603 info message. In the above example,
the log file contains:
MSI (s) (DC:DC): Executing op: FileCopy(SourceName=sample.exe, SourceCabKey=sample.exe,
DestName=sample.exe, Attributes=0, FileSize=2044928, PerTick=32768, , VerifyMedia=1, , , , ,
CheckCRC=0, Version=2.0.2600.0, Language=0, InstallMode=59244544, , , , , , )
…
Info 1603. The file D:\test\sample.exe is being held in use. Close that application and retry.
At the end of the script during cleanup, the following log file message identifies the culprit for the
reboot:
Info 1903. Scheduling reboot operation: Deleting file D:\Config.Msi\12544a31.rbf. Must reboot to
complete operation.
While the file is named 12544a31.rbf, it is the Sample.exe file. In order to install the file, the in-use file
was renamed to the .rbf file and will be deleted upon reboot.
46) When launching an installation from a system account, I receive error 2103. Why?
Ans: Launching an installation from a system account, like the scheduler service, may result in the
2103 error. This can occur if you are initiating a per-user installation. Only per-machine installations
10
are permitted from the system account because the system account does not have all of the
necessary per-user profile folders.
47) Why do I receive error 2755 when launching an installation from a mapped drive letter on a
terminal server?
Ans: Windows 2000 and earlier operating systems do not support passing mapped drive letter
information between terminal server sessions. Since Windows Installer service runs as a service in
the console session, mapped drive letters established in remote sessions are not visible to Windows
Installer service, resulting in this error. This only applies when running the service in Application
Server mode, not Remote Admin mode.
Note that this limitation no longer exists in Windows XP and later operating systems.
48] The product code must be changed if any of the following are true for the update:
Coexisting installations of both original and updated products on the same system must be
possible.
The name of the .msi file has been changed.
The component code of an existing component has changed.
A component is removed from an existing feature.
An existing feature has been made into a child of an existing feature.
An existing child feature has been removed from its parent feature.
When using a version of the installer prior toversion 2.0, the product code must be changed if a
component has been added to an existing feature. With version 2.0, and later versions, a
component may be added to an existing feature without requiring a product code change.
Note that adding a new child feature, consisting entirely of new components, to an existing feature
does not require changing the product code.
NOTE
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.
Predefined Predefined path variables are path variables that point to some of the most commonly
12
used folders. Unlike other types of path variables, these values cannot be edited in
Path Variables
InstallShield.
See Registry The values of registry-based path variables are derived from the registry keys you
Path Variables created. After creating the registry key, you need to set a path variable to this key.
Environment path variables are based on the values of your system's environment
Environment
variables. You can set an environment path variable to an existing environment
Variables
variable.
Standard, or user-defined, path variables are defined through InstallShield. You can
Standard Path
specify a path variable such as <MyFiles> with a value of C:\Work\Files. These
Variables
variables do not rely on any outside sources, such as the registry or system paths.
MSI (s) (3C:CC) [07:52:18:321]: Feature: CitiAudit; Installed: Absent; Request: Local; Action: Local
MSI (s) (3C:CC) [07:52:18:321]: Feature: Complete; Installed: Absent; Request: Local; Action:
Local
13