FAQ On MSI Packaging and Repackaging
FAQ On MSI Packaging and Repackaging
1 Alpha 1
1.
Process of creating an installer for an application is called application packaging. Usually in it binary files provided by developer's 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 package, which might be MSI or legacy package (such as executable, batch files, etc)
2.
Repackaging (Customized Installation) is the process of capturing the changes made by an Installation Program (Package) and it is designed to support company standards and distribution methods.
3.
a. b. c. d. e. f.
4.
Why repackaging is required & what are the problems in Legacy Installation?
Most common reasons for Re-packaging are as follows a. Customized Installation b. Reduce Support Costs c. Self Repair d. Source Resiliency e. Unattended Install Problems with Legacy Installations. f. High Support Costs g. Fragile Installs & un-installs h. Difficult & labor Intensive to deploy
5.
a. b. c. d. e. f.
6.
a. b. c. d.
7.
a. b. c. d. e.
8.
It is a built-in Operating System service for Installing and Managing Applications. It provides a standard method for developing, customizing, installing and updating applications. The Windows Installer (previously known as Microsoft Installer) 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. Windows Installer is positioned as an alternative to stand-alone executable installer frameworks such as older versions of InstallShield and Wise (later versions of both products are based on Windows Installer) and NSIS.
9.
a. b. c. d. e. f.
10. What are the types of Setup Captures in Wise / Install shield?
In Wise Package Studio there are three types Virtual Capture: Creates a clean virtual OS on your computer, and the installation is redirected in the clean virtual OS. SmartMonitor: Watches the installation and records the changes the installation performs.
Snapshot: Scan the computer before and after the installation and record the differences between the first scan and the second. In Install Shield there are two types 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.
FAQ on MSI Packaging & Repackaging, Ver: 0.0.1 Alpha 1 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.
17. What is self-healing 18. What is the difference between Self-Healing and Repair 19. What is Registry, Tell the Structure & types of Registry?
The Registry is a single place for storing information about the Windows OS (Hardware & Software).
a. b. c. d.
3/15
Types of Registry keys a. Machine-Specific (HKCR, HKLM, HKCC, HKU) b. User-Specific (HKCU, HKU) Types of Registry Root keys a. HKEY_CLASS_ROOT (HKCR) b. HKEY_LOCAL_MACHINE (HKLM) c. HKEY_CURRENT_CONFIG (HKCC) d. HKEY_CURRENT_USER (HKCU) e. HKEY_USERS (HKU) 20. What are Shortcuts & Types?
Shortcuts are the entry points to the applications installed on the system which is normally points to a file. a. b.
Advertised (File should be Installed by the Application) Non Advertised (File that is not part of Installation. It is also called Command Line shortcuts)
24. In the MSI, which tables contain information about the service details?
a) ServiceInstall (Service Details) b) ServiceControl (Controlling the service during Installation & UnInstallation)
FAQ on MSI Packaging & Repackaging, Ver: 0.0.1 Alpha 1 on their file extension. A file that carries no extension or no associated program is called Orphaned.
27. What is Environment Variable & its types? Environment Variables are the variables that are set by the Operating System & Application. a) System Variable (Available for all users) b) User Variable (Available for that particular user) 28. What is Property & types of Properties, give some Examples?
Properties are global variables that the Microsoft Windows Installer uses during an installation. Private: The installer can be use only internally (values cant be changed during the run time). Manufacture, ProductCode, ProductID, ProductName, ProductVersion Public: The installer can be uses both internally & externally (values can be changed during the run time also). INSTALLLEVEL, . Restricted Public: The user cant change the value both internally & externally due to security purposes. ALLUSERS, REBOOT, REINSTALLMODE
32. 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.
33. How to give Permission for files, folders & Registry keys through VB Script & what is the syntax? We can give permission for files & folders through VB Script by using the CACLS & XCACLS commands. CACLs should only run on NTFS partitions. CACLS Changes Access Control ListS Cacls <file name> [/T] [/E] [/C] [/G user: perm] [/R user [...]] [/P user: perm [...]] [/D user [...]] /T Changes ACLs of specified files in the current directory and subdirectories
2010 Mayank Johri, Saturday, July 24, 2010 5/15
/E /C /G /R /P /D
Edit ACL instead of replacing it Continue (ignore) access denied errors user : perm where access rights granted can be: R C F (read, change, full control) user Revoke specified user's access rights (only valid with /E) user: perm Replace specified user's access rights. Permission can be: N R C F (none, read, change, full control) user Deny specified user access E.g. cacls c:\myfile.txt /E /G <user name>: F
34. What is VB Script? 35. What is Wise Script? 36. Tell some objects in the VB Script & when & why it is used in the Application? 37. How to install only one particular feature during the Installation through Command line?
msiexec /i <msi> ADDLOCAL=<Feature Name>
38. How to disable ARP (Add/Remove Programs) Details during the Installation through Command line, tell some ARP properties?
msiexec /i <msi> ARPSYSTEMCOMPONENT=1 Following entries are various ARP properties a) ARPAUTHORIZEDCDFPREFIX b) ARPCOMMENTS c) ARPCONTACT d) ARPINSTALLLOCATION e) ARPNOMODIFY f) ARPNOREMOVE g) ARPNOREPAIR h) ARPPRODUCTICON i) ARPREADME j) ARPSIZE k) ARPSYSTEMCOMPONENT l) ARPURLINFOABOUT m) ARPURLUPDATEINFO
39. During Installation how to take a back up copy of the Application through Command line? 40. What is Dll Cache folder? 41. What is Advertisement?
2010 Mayank Johri, Saturday, July 24, 2010 6/15
It means that, the Availability of an application to users or others with out actually the full Installation. There are two types of Advertising a) 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. b) 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. 42. What is Advertised Feature & Component?
If a Feature or Component is advertised, only the interfaces required for loading and launching the application are installed to the user or others. If a user activates an advertised interface the installer then proceeds to install the necessary Components & Features.
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. 46. 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 47. 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
FAQ on MSI Packaging & Repackaging, Ver: 0.0.1 Alpha 1 process. For some cases the developer writes an action to execute his own installation is called custom action
50. What are the types of Custom Actions? a) b) c) d) e) f) g) h) i) j) k) l) m) n) o) p) q) r) s) t) DLL file stored in a Binary table stream DLL file that is installed with a product EXE file stored in a Binary table stream EXE file that is installed with a product Displays a specified error message and returns failure, terminating the installation EXE file having a path specified by a property value EXE file having a path referencing a directory JScript file stored in a Binary table stream JScript file that is installed with a product JScript text specified by a property value JScript text stored in this sequence table VBScript file stored in a Binary table stream VBScript file that is installed with a product VBScript text specified by a property value VBScript text stored in this sequence table Property set with formatted text Directory set with formatted text Installation of a package nested inside of the first package. See Nested Installation Actions Installation of a package that resides in the first applications source tree. See Nested Installation Actions Installation of an application that is advertised or already installed. See Nested Installation Actions
Normal User Interface Normal Execute Immediate / Deferred Administrative User Interface Administrative Execute Immediate / Deferred
52. What are the types of Conditions in the Custom Actions and what is the use?
a) Not Installed - During Installation only b) REMOVE - During UnInstallation only c) NOT REMOVE - During both Install & UnInstall
53. What are the types of In Script options in the Custom Actions?
a) Immediate Execution Immediate custom actions, can be sequenced anywhere within any of the sequence tables. It has access to the installation database (read & set installation properties, modify feature & component states, add temporary columns, rows, and tables). b) Deferred Execution User Context Deferred custom actions can only be sequenced between the InstallInitialize and InstallFinalize actions in execute sequence tables. It doesnt 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 2010 Mayank Johri, Saturday, July 24, 2010 8/15
FAQ on MSI Packaging & Repackaging, Ver: 0.0.1 Alpha 1 InstallExecute, InstallExecuteAgain, or InstallFinalize action is run. If the Current User doesnt have the elevated privileges (Custom actions make changes in the system directly), the custom actions should run in Deferred Execution in User Context only. c) Rollback only This Action should be executed during the Installation of the Rollback script or if the Installation is Unsuccessful d) Commit only This Action should be executed during the Installation of the Commit script. e) Deferred Execution System Context Deferred custom actions can only be sequenced between the InstallInitialize and InstallFinalize actions in execute sequence tables. It doesnt have access to the installation database. Deferred custom actions are not executed immediately. Instead they are scheduled to run later during the execution script. The execution script isn't processed until the InstallExecute, InstallExecuteAgain, or InstallFinalize action is run. If the Current User have the elevated privileges (Custom actions make changes in the system directly), then it should run in Deferred Execution in System Context only.
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 Immediate custom actions have access to the Installation database Deferred custom actions doesnt 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.
55. 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 56. 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. Synchronous, ignore exit code: Windows Installer runs the custom action synchronously to the main installation. It waits for the custom action to complete before continuing the main installation; the action can be either success or fail. Asynch, wait at end of sequence: Windows Installer runs the custom action simultaneously with the main installation. At the end it waits for the exit code from the custom action before continuing. Asynch, no wait: Windows Installer runs the custom action simultaneously with the main installation. It doesnt wait for completion of the custom action and doesnt check the exit Saturday, July 24, 2010 9/15
b)
c)
d)
FAQ on MSI Packaging & Repackaging, Ver: 0.0.1 Alpha 1 code also.
57. What are the types of Scheduling Options in the Custom Actions and what is the use?
a) b) c) d) Always Execute: This action execute in all sequences Run first time: This action execute only the first time Windows Installer encounters it. 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. Run only if UI sequence was run: This action execute only if either Execute sequence is run following User Interface sequence.
60. What is Isolated Component, why we are using and its types?
It means that to prevent overwriting of previous versions of shared components, and ensures that other applications do not overwrite your version of shared components.
a) b)
63. What is the latest version of Wise Package studio & Install Shield Admin Studio?
Find out user self.
64. What is the difference between Wise Package Studio & Install Shield Admin Studio? Need to find the info myself. 65. What is Conflict Management?
When two or more applications install the same system files (DLLs, .VBXs, and .OCXs), Windows registry, and other items. To detect, Conflict Management should be use and for resolve the software conflicts, Application Isolation concept should be use
66. What are the types of Deployment (Software Distribution)? a) b) c) d) Group policy (Active Directory) Software Update Services (SUS) Windows Update Web site Systems Management service (SMS)
72. How do deploy the Package? a) b) c) d) Group policy (Active Directory) Software Update Services (SUS) Windows Update Web site Systems Management service (SMS)
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. 74. What is Active Directory?
Deploying applications through the Active Directory is done through the use of group policies, and therefore applications are deployed either on a per user basis or on a per computer basis.
75. What are the other tools which are used during the testing & solving the Issues in the Application? a) b) c) d) e) f) g) h) i) j) k) Picture Taker Windows Install Master InstallRite RegMon FileMon procmon Process Explorer CsDiff Icon Extractor & Icon Builder RegExtractor WiLogUtl
Saturday, July 24, 2010 11/15
l) WiseComReg 76. What is Orca tool & what is the purpose and Advantages?
Microsoft utility to view, update, validate MSI files.
78. 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 use INDSTALLDRIVE=C:\ 79. 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.
81. 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 feature-component 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 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.
82. 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.
83. What is ICE? It means Internal Consistency Evaluation. ICEs are used to validate installation packages against various generic issues.
12/15
84. Give some ICE Error number and tell how to solve the ICE Errors?
There are totally 96 ICE Errors and 14 ICEM Errors in the Windows Installer. Some examples are as follows a) ICE03 - Basic data and foreign key validation b) ICE18 - Validates the KeyPath column of the Component table when it is NULL. c) ICE21 - Validates that all components in the Component table map to a feature in the FeatureComponents table. d) ICE33 - Checks for entries in the registry table that belong in other tables. e) ICE38 - Validates that components installed under the user's profile use a registry key under HKCU as their key path. f) ICE64 - Checks that new directories in the user profile are removed in roaming scenarios. g) ICE57 - Validates that individual components do not mix per-machine and per-user data. h) ICE59 - Checks that advertised shortcuts belong to components that are installed by the target feature of the shortcut.
a) b) c) d) e) f) g) h) i)
- Microsoft Windows Installer Project file - Install Shield Project file - Microsoft Windows Installer - Microsoft Transform - Windows Installer Patch Project file - Microsoft Windows Installer Patch - Microsoft Windows Installer Merge Module Project file - Microsoft Windows Installer Merge Module - Executable file
13/15
FAQ on MSI Packaging & Repackaging, Ver: 0.0.1 Alpha 1 C:\Document and Settings\All Users\Application Data\ [CommonFilesFolder] C:\Program Files\Common Files\ [DesktopFolder] C:\Documents and Settings\Current User\Desktop\ [FavoritesFolder] C:\Documents and Settings\Current User\Favorites\\ [FontsFolder] C:\Windows\Fonts\ [LocalAppDataFolder] C:\Documents and Settings\Current User\Local Settings\Application Data\ [MyPicturesFolder] C:\Documents and Settings\Current User\My Documents\My Pictures\ [NetHoodFolder] C:\Documents and Settings\Current User\NetHood\ [PersonalFolder] C:\Documents and Settings\Current User\My Documents\ [PrintHoodFolder] C:\Documents and Settings\Current User\PrintHood\ [ProfilesFolder] C:\Documents and Settings\Current User\ [ProgramFilesFolder] C:\Program Files\ [ProgramMenuFolder] C:\Documents and Settings\Current User\Start Menu\Programs\ [RecentFolder] C:\Documents and Settings\Current User\Recent\ [SendToFolder] C:\Documents and Settings\Current User\SendTo\ [StartMenuFolder] C:\Documents and Settings\Current User\Start Menu\ [StartupFolder] C:\Documents and Settings\Current User\Start Menu\Programs\Startup\ [System16Folder] C:\Windows\System\ [SystemFolder] C:\Windows\System32\ [TempFolder] C:\Documents and Settings\Current User\Local Settings\Temp\ [TemplateFolder]
14/15
FAQ on MSI Packaging & Repackaging, Ver: 0.0.1 Alpha 1 C:\Documents and Settings\Current User\Templates\ [WindowsFolder] C:\Windows\ [WindowsVolume] C:\
90. What are the default Environment settings in XP? o ALLUSERSPROFILE C:\Documents and Settings\All Users APPDATA C:\Documents and Settings\current User\Application Data CommonProgramFiles C:\Program Files\Common Files 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
o
o o o o o o o o o o o o o
93. Tell some complex Applications you did & what is the Issue and how you solve the Issue?
Provide few of your complex applications such as Office, etc 2010 Mayank Johri, Saturday, July 24, 2010 15/15