Easy MSI - A basic guide to Windows Installer

Click here to edit subtitle

In this section you can find the correct answers for the Self-Test questions that close each chapter in order to measure your understanding.

Chapter 2 - Basics

The correct answers for the Self-Test questions of chapter 2 are as follows:

Question
 Correct answer(s)
 Comment
1. Which is true about the product name?
b) and c)
The product name has to be provided in the Subject summary property of the SIS as well as in the ProductName property in the Property table.
2. Imagine Blaster Master was a 64-bit application. Which Plattform property value could be set?
b) and c)
An Intel platform is not able to run 64-bit code.
3. Which is true about the package code?
a) and b)

All non-identical MSI packages must have a different product code.

4. Which is true about Features and Components?
a), b), c), e) and f)
Every component must belong to at least one feature but a feature does not necessarily need to have a component.
5. Imagine you don't want the Comp_Reg_ProdName component of the blastermaster.msi to be removed when you uninstall the package. How could you achieve this?
a) and b)
If the Permanent is set, the component does not get removed during an uninstall. If the ComponentId is null the component does not register the component and thus it cannot be removed at uninstall.
6. Which is true about the Directory_ column of the Component table?
a) and c)
The Directory_ column is a reference into the Directory table and for non-file components (registry keys, shortcuts, etc.) the Directory_ column has the value TARGETDIR.
7. Which is true about the Component table's Condition column?
b)
If the conditional expression evaluates to true the component will be installed.
8. Which of the following properties are public?
b), c) and d)
All uppercase properties are public.
9. Which of the following properties are required?
a), b), c), d), and e)
The UpgradeCode property is not required but necessary when you plan for future major upgrades.
10. Which of the following tables do you need to author to read from the registry?
a), and c)
The Signature table is only required when AppSearch is used to search for files.

Chapter 3 - Files and more

The correct answers for the Self-Test questions of chapter 3 are as follows:

Question
 Correct answer(s)
 Comment
1. Which tables need to be authored to install one single file?
  a), b), c), d) and f)
Each file requires a record in the File table. This record is tied to a component that belongs to a feature (via the FeatureComponent table). In case the file is in .cab file the number in the Media table must be incremented.
2. True or False? The property table can be used to set a property to the value of another property.
  b)
The Property table cannot be used to set a property to the value of another property.
3. Imagine you want to copy the file "A.txt" that's installed with your package, to the same folder under the new name "B.txt". Which table do you use?
  b)
Since the file "A.txt" is installed with your package, the DuplicateFile table is used for that purpose.
4. True or False? Files copied by the MoveFile table are not removed during uninstall.
  a)
True. Files copied by the MoveFile table are not removed during uninstall.
5. Assume your product requires that an assembly is installed to both the GAC and to the local file system. How do you do that?
  c)
For installing an assembly to both the GAC and to the local file system you need to create two components.
6. Which table(s) do you author in your MSI package, in order to register a COM Server?
  c)
The best way of registering a COM server is authoring the Registry table.
7. Imagine the Name column of the Environment table has the following entry: -!BlastermasterPath. Which of the following is true?
  a) and b)
  -! means that the variable is removed during install or uninstall.
8. Which of the following file types can be used for Icons?
  a), b) and c)
The Data column of the Icon table hold the binary icon data of either a .dll, .exe, or .ico file.
9. True or False? When the Directory column of the Directory table contains the name of a built-in property (such as DesktopFolder) the other columns my take any value.
  a)
True. In this case the other two columns are actually ignored and thus can take any value.
10. Which of the following is true about "advertised shortcuts"?
  b), c), and e)
The Target column contains the name of a feature. The file launched is the key file of its component. When you right-ckick and advertised shortcut and go to its property page, the "target field" is greyed out.
11. Imagine a component consists of two files "A" and "B" and file "A" is the key file. Which of the following is true in case of a repair?
  a) and c)
If the key file is removed, the whole component (with all its files) is restored in case of a repair.

Chapter 4 - Sequences and Actions

The correct answers for the Self-Test questions of chapter 4 are as follows:

Question
 Correct Answer(S)
 Comment
 1. Which is true about the Type of a Custom Action?
  a) and b)
The type of a Custom Action is set by the bits in the Type column. The concrete meaning of both Source and Type column varies depending on the value of the Type column.
 2. In which table can you specify which text is displayed on the progress bar window while your Custom Action is running?
  c)
The text displayed on the progress bar while a Custom Action is running is set in the ActionText table.
 3. Where can you put your code in a VBScript Custom Action?
  b), d), e) and f)
Depending on the Type of the VBScript Custom Action you either put a file containing the code into the Binary table or File table or you can put the code into the Target column or into a Property.
 4. Which programming language can you use to create a DLL for a DLL Custom Action?
  b), c) and d)
DLLs for DLL Custom Actions can be written in C++, C# or VisualBasic.
 5. True or False? You can use a Type 51 Custom Action or the Property table to set a property to the value of another property.
  b)
False. You cannot use the Property table to set a property to the value of another property.
 6. True or False? You can use both the LaunchCondition table and Error Custom Actions to check for installation prerequisites.
  a)
True. You can use both the LauchCondition table and Error Custom Actions to check for installation prerequisites.
 7. True or False? Concurrent Installations are the first choice for installations intended to be released to the public when you want to start another MSI from your current installation.
  b)
False. Concurrent Installations should be avoided.
 8. What is the difference between immediate execution and deferred execution?
  a), b), c), and e)
Immediate execution Custom Actions are executed when they are encountered in the Sequence while deferred execution Custom Actions are written into the installation script and executed when the script is processed. Deferred Execution Custom Actions need to be scheduled between InstallInitialize and InstallFinalize. Immediate Execution Custom Actions cannot be rolled back by the rollback script.

 9. True or False? You can use the following code to get the TARGETDIR with a VBScript Custom Action?

targetDir = session.Property("TARGETDIR")

  a)
True. In a VBScript Custom Action you can use the session object this way to get the value of a Property.
 10. True or False? Immediate Execution Custom Actions should not modify the target system as they cannot be rolled back.
  a)
True. Immediate Execution Custom Actions cannot be rolled back.
 11. How do you check in a conditional statement whether the feature "MyFeature" is already installed on the target system?
  a)
!MyFeature=3 means that the install state of the feature MyFeature is set to "on the local computer" (3=INSTALLSTATE_LOCAL).
 12. What does the following conditional statement say?
(&MyFeature=2) AND (!MyFeature=3)
  b)
&MyFeature=2 means "action state is set to absent".
!MyFeature=3 means "install state is set to on local computer".
--> On local computer but will be uninstalled.

Chapter 5 - Installing Windows Services

The correct answers for the Self-Test questions of chapter 5 are as follows:

Question
 Correct Answer(S)
 Comment
 1. How can you install a Service with an MSI package?
  a), b), c) and d)
All answers are correct but using the ServiceInstall table is the preferred solution.
 2. Which is the preferred way to install a Service with an MSI package - by a Custom Action or by the ServiceInstall table?
  b)
It is always better to rely on standard Installer tables than on Custom Actions.
 3. True or False? You can specify user accounts other than LocalSystem for any Service type.
  b)
False. The LocalSystem account must be used for all services that are of type "Win 32 Share Process" or "Interactive Process".
 4. True or False? The password as specified in the Password column of the ServiceInstall table is accessible during a reinstall of the service.
  b)
False. The password specified in the Password column is not accessible during a reinstall of the service.
 5. True or False? The executable tied to the component referred to in the Component_ column of the ServiceInstall table must be the KeyPath of the component.
  a)
True. The executable tied to the service must be the key file of the component.
 6. Which table is used to uninstall a service?
  c)
The ServiceControl table is used to uninstall a service.
 7. Which table is used to start or stop a service?
  c)
The ServiceControl table is used to start or stop a service.
 8. Which bit flags can you set in the Event column of the ServiceControl table to specify that a service is stopped (if running) and uninstalled during package uninstallation?
  b) and c)
UninstallStop only stops the service, and depended services if any, and does not uninstall it.

Chapter 6 - User Interface

The correct answers for the Self-Test questions of chapter 6 are as follows:

Question
 Correct Answer(S)
 Comment
 1. Which of the following tables are related to the User Interface?
  a), b), c), e), f) and g)
All are correct except answer d). The table for the control events is called ControlEvent table, not Event table.
 2. Which tables do you author to add a button in a dialog for navigation to another dialog?
  b) and c)
If you already have an existing dialog you do not need to author the Dialog table. You add a row to the Component table for the button and a row to the ControlEvent table for the NewDialog event.
 3. Where does the text on a control come from?
  a), b) and c)
There is no ControlText table. The text comes either directly from a String in the Text column of the Control table or indirectly from a Property. Some controls take their texts from the UIText table.
 4. What is the purpose of a transform (.mst file)?
  b)
All answers are correct but answer b) applies best.
 5. Which table is used to specify what a PushButton control is supposed to do when it is clicked?
  b)
A PushButton control publishes events via the ControlEvent table.
 6. Which table is used to subscribe a ProgressBar control to a SetProgress event?
  a)
A ProgressBar control subscribes events via the EventMapping table.
 7. What control type do you use to display an edit field?
  b)
An Edit control displays an edit field.
 8. Which of the following UI levels exist?
  b)
The following UI levels exist: Full, Reduced, Basic, None.

Chapter 7 - Patches and Updates

The correct answers for the Self-Test questions of chapter 7 are as follows:

Question
 Correct Answer(s)
 Comment
1. Assume you need to ship an update that adds a new feature. What type of update do you choose?
a)
When you add a new feature you need a major upgrade.
 2. Assume you need to ship an update that adds a new component. Which type of update do you choose?
a), b) and c)
Adding a new file is possible with all types of update.
 3. True or False? For the lifetime of a product, through all of its incarnations, the UpgradeCode must never change.
a)
True. For the lifetime of a product, the UpgradeCode must never change.
 4. Which of the following update types require a change of the product code?
a)
Only a major upgrade requires a change of the product code.
 5. Which of the following update types require a change of the product version?
a) and b)
Both a major and a minor upgrade require a change of the product version.
 6. True or False? Windows Installer ignores the fourth digit of the product version when detecting other versions.
a)
True. Windows Installer only uses the first three digits of the product version when detecting other versions.
 7. When do you typically choose a minor upgrade?
b)
You typically choose a minor upgrade when you need to ship a service pack that changes or adds multiple files and the scope of changes justifies a version change.
 8. True or False? A minor upgrade can be shipped both as a full MSI package and as a "patch file" (MSP).
a)
True. A minor upgrade can be shipped both as a full MSI package and as a "patch file" (MSP).
 9. True or False? A small update requires a change of the product version.
b)
False. A small update does not change the product version.