Shopping Cart
Your Cart is Empty
Quantity:
Subtotal
Taxes
Shipping
Total
There was an error with PayPalClick here to try again
CelebrateThank you for your business!You should be receiving an order confirmation from Paypal shortly.Exit Shopping Cart

Chapter 2 - Basics 

Download solution at: https://drive.google.com/file/d/1mhqt0-pGM5_gv9PY95Se0fCxtHCxDDFH/view?usp=sharing

Exercise 2.1: Authoring the SIS

In this exercise you will author the Summary Information Stream of your just created blastermaster.msi package.

Open your blastermaster.msi package with InstEd. Click on Tables > Summary Info and modify the Summary Information Stream with the values as shown in table below.

SUMMARY PROPERTY

VALUE

Title

Installation Database

Author

Easy MSI Book Company

Subject

Blaster Master

Comments

This installer database contains the logic and data required to install Blaster Master

Keywords

Installer, Blaster Master

Platform

Intel

Languages

1033

 Package Code

{E3A8910A-DA82-420E-936A-6F8E42C3A28F} (Click button to generate new GUID)

Schema

400

Security

read-only recommended

 Image Type

External Tree. Long file names

Requires elevated privileges? (Checkbox)

 Yes (Tick checkbox)

 Code Page

1252

Exercise 2.2: Adding Features and Components


In this exercise you will use InstEd to add new features and components to your blastermaster.msi package.


First you need to author the Feature table and add the three new features "Blaster Master", "User Manual", and "Blaster Master Service" as described by the tables below:

COLUMN

VALUE

Feature

Feature_BlasterMaster

Feature_Parent

 <null>

Title

Blaster Master

Description

 Core binaries to run the game.

Display

2

Level

1

Directory_

 <null>

Attributes

 0x0000

COLUMN

VALUE

Feature

Feature_UserManual

Feature_Parent

 <null>

Title

User Manual

Description

 The User Manuals as PDF.

Display

1

Level

1

Directory_

 <null>

Attributes

 0x0000

COLUMN

VALUE

Feature

Feature_BlasterMasterService

Feature_Parent

 <null>

Title

Blaster Master Service

Description

 Blaster Master Service logging to the Event Log.

Display

1

Level

1

Directory_

 <null>

Attributes

 0x0000

Next add the two records for the subfeatures (english and german user manals) to the Feature table:

COLUMN

VALUE

Feature

Feature_UserManual_English

Feature_Parent

Feature_UserManual

Title

English

Description

 The English User Manual.

Display

2

Level

1

Directory_

 <null>

Attributes

 0x0000

COLUMN

VALUE

Feature

Feature_UserManual_German

Feature_Parent

Feature_UserManual

Title

German

Description

 The German User Manual.

Display

2

Level

1

Directory_

 <null>

Attributes

 0x0000

Next add the record for the "Product Name Registry Key" to the Component table:

COLUMN

VALUE

Component

Comp_Reg_ProdName

ComponentId

 <new GUID>

Directory_

TARGETDIR

Attributes

0x0004

Condition

 <null>

KeyPath

 <null>

Finally link the component to its feature by adding the following record to the FeatureComponents table:

COLUMN

VALUE

Feature_

Feature_BlasterMaster

Component_

Comp_Reg_ProdName

Exercise 2.3: Properties


In this exercise you will a the required properties to your blastermaster.msi package.


Add the following new records to the Property table:

PROPERTY

VALUE

ProductCode


ProductVersion

1.0.0

ProductName

 Blaster Master

Manufacturer

Easy MSI Book Company

UpgradeCode


Then add the following new record to the Directory table:

COLUMN

VALUE

Directory

TARGETDIR

Directory_Parent


DefaultDir

SourceDir

Exercise 2.4: Installing to the Registry and AppSearch


In this exercise you will install keys to the Registry and using AppSearch for finding files, directories, components, .ini file entries, and registry values.


As a first start use AppSearch to find out if the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727 registry key exists.

Therefore add the following new record to the AppSearch table:

COLUMN

VALUE

Property

DOTNET_REGKEY

Signature_

RegLocator_DOTNET_REGKEY

Next add the following new record to the RegLocator table:

COLUMN

VALUE

Signature_

RegLocator_DOTNET_REGKEY

Root

 0x002 (HKLM)

Key

 SOFTWARE\Microsoft\.NETFramework\v2.0.50727

Name


Type

 0x002 (registry value)

Now author the LaunchCondition table for making the presence of the .NET registry key a launch prerequiste for the package:

COLUMN

VALUE

Condition

 NOT DOTNET_REGKEY

Description

 This package requires .NET Framework 2.0 to run.

In a next step we use AppSearch in order to find the path to notepad.exe.

Therefore first add the following new record to the AppSearch table:

COLUMN

VALUE

Property

NOTEPAD_PATH

Signature_

Signature_NOTEPAD_PATH

Then add the following record to the Signature table:

COLUMN

VALUE

Signature_

Signature_NOTEPAD_PATH

FileName

 notepad.exe

MinVersion

 

MaxVersion

 

MinSize

 

MaxSize

 

 MinDate

 

MaxDate

 

Languages

 

Then add the following record to the DrLocator table:

COLUMN

VALUE

Signature_

Signature_NOTEPAD_PATH

 Parent

 

Path

 [SystemFolder]

 Depth

0

Now we use AppSearch for a component search in order to retrieve the path of InstEd.exe.

Therefore first add the following new record to the AppSearch table:

COLUMN

VALUE

Property

INSTED_PATH

Signature_

CompLocator_INSTED_PATH

Next add the following new record to the CompLocator table:

COLUMN

VALUE

Signature_

CompLocator_INSTED_PATH

ComponentId

{578FE71F-EDB7-4A0A-A9A4-4D9877E1385D}

Type

1

Now we are writing the Product Name into the resistry. For that purpose add the following new record to the Registry table:

COLUMN

VALUE

Registry

Reg_ProductName

Root

 0x002 (HKLM)

Key

 SOFTWARE\[Manufacturer]\[ProductName]

Name

ProductName

Value

[ProductName]

Component_

Comp_Reg_ProdName

Now you need to create the component for writing the AppSearch results into the registry.

Therefore add the following new record to the Component table:

COLUMN

VALUE

Component

Comp_Reg_AppSearchKeys

ComponentId

 

Directory_

TARGETDIR

Attributes

0x0004

Condition

 

KeyPath

 

Then add the just created component to the "Blaster Master" feature by authoring the FeatureComponents table:

COLUMN

VALUE

Feature_

Feature_BlasterMaster

Component_

Comp_Reg_AppSearchKeys

Finally import the file export.reg as described in the book.

Once this is done fix the imported entries in the Registry table as follows:

REGISTRY

ROOT

KEY

NAME

VALUE

COMPONENT

Reg_AppSearchKeys_reg00000

2

SOFTWARE\[Manufacturer]\[ProductName]

DOTNET_REGKEY

[DOTNET_REGKEY]

Comp_Reg_AppSearchKeys

Reg_AppSearchKeys_reg00001

2

SOFTWARE\[Manufacturer]\[ProductName]

NOTEPAD_PATH

[NOTEPAD_PATH]

Comp_Reg_AppSearchKeys

Reg_AppSearchKeys_reg00002

2

SOFTWARE\[Manufacturer]\[ProductName]

INSTED_PATH

[INSTED_PATH]

Comp_Reg_AppSearchKeys