21
ust saying hi Componentizing Applications End To End using Windows Embedded Standard 2009 Microsoft ® Virtual Labs 

Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 1/21

aying hi

Componentizing Applications EndTo End using Windows EmbeddedStandard 2009 

Microsoft ® Virtual Labs 

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 2/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Table of Contents

Componentizing Applications End To End using Windows Embedded Standard 2009 ....... 1 Exercise 1 Track the application install ......................................................................................................................... 2 Exercise 2 Create the Application SLD ......... ........... .......... ........... .......... ........... ........... .......... ........... .......... ........... ...... 8 Exercise 3 Static analysis of the application binaries ......... ........... .......... ........... .......... ........... ........... .......... ........... .... 11 Exercise 4 Optional - Dynamic analysis of Application dependencies .......... ........... ........... .......... ........... .......... ........ 15 Exercise 5 Optional - Create a resource component .......... .......... ........... .......... ........... .......... ........... .......... ........... ...... 17 Exercise 6 Deploy and test the new component .......... ........... .......... ........... .......... ........... ........... .......... ........... .......... . 18 

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 3/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 1 of 19

Componentizing Applications End To End

using Windows Embedded Standard 2009

Objectives After completing this lab, you will be better able to:  Track the application Install

  Create the Application SLD

  Dynamic analysis of the application dependencies

ScenarioThis lab focuses on steps to componentize a complete application for Windows

Embedded Standard 2009. This lab includes exercises to aid in componentization

pain points such as analyzing binary dependencies and registry entries required

for an Application. Participants would be able to use this knowledge to

seamlessly incorporate applications for which you source code might not be

available into their Runtimes. This lab has a prerequisite on the participant to be

familiar with Component Designer.

Estimated Time toComplete This Lab  90 Minutes

Computers used in thisLab GettingStartedandCustomComponents

The password for the User account on all computers in this lab is: P@ssw0rd. 

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 4/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 2 of 19

Exercise 1Track the application install 

Scenario

We will be using Process Monitor to get the resources created during the install of PowerPoint Viewer 2003. Thereare ample of commercial setup tracking software. We will be using the free tool Process Monitor from Microsoft to

track the install with respect to the files and registry entries created.

Tasks Detailed Steps

Complete the following

tasks on:

GettingStartedandCusto

mComponents

1.  Set Appropriate

Filters in Process

Monitor

 Note: This Lab might be quite time consuming. Please use the completed files for each

task in C:\COMPONENTIZE\Exercise to skip ahead.

We set appropriate filters to track just the installer process in Process Monitor.

a.  Create a folder called Componentize under C:.

b.  Copy the contents from C:\Lab_EndToEndComponentization to this new folder.

c.  Launch Process Monitor from

C:\COMPONENTIZE\Tools\ProcessMonitor\Procmon.exe (right-click and

Run as Administrator). Reset the filter (Filter | Reset filter).

d.  Press CTRL+E to stop the capture and clear the display with CTRL+X. Now you

have an empty capture session.

e.  The application we are installing uses Microsoft Installer. Let’s set filter in Process

Monitor to track only the operations done by the Microsoft Installer Process

msiexec.exe.

f.  Filter | Filter or CTRL + L should bring the filter menu. Add a filter “Process

Name is not msiexec.exe then Exclude”. This enables tracking only msiexec.exe

g.  Press Add and Ok on the Filter window to set the filter.

2.  Start installation a.  Press CTRL+E or File | Capture Events to start capturing events.

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 5/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 3 of 19

Tasks Detailed Steps

and get the list of 

files owned by the

component.

b.  Install PowerPoint viewer at C:\COMPONENTIZE\App\ppviewer.exe (right-

click and Run as Administrator).

c.  Once the installation is complete, stop the capture process in Process Monitor by

pressing CTRL+E. Now we can start collecting information about the files and

registry keys created.

d.  Add a filter “Operation-is not-WriteFile-then-Exclude” to narrow the view to the

new files that were written as part of the install.

e.  You should get a list of WriteFile operations. This corresponds to the list of the

files written during the installation.  Select the Tools | Unique Values to exclude multiple entries of the same file.

  Once the “Show Unique Values” window opens, select Path from the column drop

down to list the files. Click the Show button.

  Select the Save option to save the results to a file, C:\Componentize\files.csv.

  Open files.csv with Notepad or Wordpad.

f.  The final list of files would be:

"C:\Config.Msi\1385abe8.rbs"

"C:\Program Files\Microsoft Office\PowerPoint Viewer\GDIPLUS.DLL"

"C:\Program Files\Microsoft Office\PowerPoint Viewer\INTLDATE.DLL"

"C:\Program Files\Microsoft Office\PowerPoint Viewer\PPTVIEW.EXE"

"C:\Program Files\Microsoft Office\PowerPoint Viewer\PPVWINTL.DLL"

"C:\Program Files\Microsoft Office\PowerPoint Viewer\PVREADME.HTM"

"C:\Program Files\Microsoft Office\PowerPoint Viewer\SAEXT.DLL"

"C:\Program Files\Microsoft Office\PowerPoint Viewer\UNICOWS.DLL"

"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office

PowerPoint Viewer 2003.lnk"

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 6/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 4 of 19

Tasks Detailed Steps

"C:\System Volume Information\SPP\metadata"

"C:\System Volume Information\SPP\snapshot"

"C:\Windows\Installer\{90AF0409-6000-11D3-8CFE-

0150048383C9}\ppvwicon.exe"

"C:\Windows\Installer\163e354.msi"

"C:\Windows\Installer\163e357.ipi"

"C:\Windows\Installer\163e359.msi"

"C:\Windows\Installer\MSI8A5A.tmp"

"C:\Windows\System32\config"

"C:\Windows\System32\config\SOFTWARE"

"C:\Windows\System32\config\SOFTWARE.LOG1"

"C:\Windows\System32\config\SYSTEM"

"C:\Windows\System32\config\SYSTEM.LOG1" 

C:\COMPONENTIZE\Exercise\Exercise 1\Task

2\List_Of_Setup_Files.txt

 Note: If Save Function in “Show Files” saves only an empty file, please use the above

 file.

g.  It is essential to ignore files that do not directly correspond to the application that

we are trying to componentize. For example, *.msi and *.ipi files are used for

Uninstall\Modify operations and it is not a typical scenario for embedded runtimes.

Similarly SOFTWARE, SOFTWARE.LOG1 etc. correspond to the registry hives

written. We now have the final list of binaries that will be owned by the

component highlighted in bold text.

h.  Even though PVREADME.HTM is very small, it needs the “Internet Explorer”

component to view which has a large footprint hit. So it is up to us to choose if we

want to increase the footprint of our runtime just to be able to view the README

file or not include it in our component. Let’s exclude the README file for this

lab.

i.  Delete all files we are not concerned about from your list and save. Close the list of 

files and move back to the Process Monitor window.

3.  Get the list of 

registry entries

created by the

installation

 Note: Filtering registry key values is done in the same way as files. However,

determining the list of keys that the component should own takes some effort.

a.  In order to apply the new filter, the previously applied WriteFile filter has to be

removed.

  Bring up the Filter menu item, click on the filter rule for the WriteFile operation

and Remove.  Add a filter “Operation is not RegCreateKey then Exclude”, to clear everything

except RegCreateKey operation.

  Apply the “Show Unique Values” constraint on Path, and save the list of registry

keys as C:\Componentize\regkeys.csv.

  Open the file in notepad.

b.  There will be a lot of keys that are not needed. We need to keep the keys that say

PowerPointViewer.*.11. We also need to keep the extension-specific keys,

namely .pot, .ppt, .pps. Finally we need to keep the installer keys that windows

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 7/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 5 of 19

Tasks Detailed Steps

uses to find and open an application. We can usually disregard all the installer keys

that have local user SIDs (Security Identifiers). These are not portable and might

change with each user during OS install. It is OK,however, to collect the

installation keys for “Well Known SIDs”. In this instance we will keep keys

pertaining to SID S-1-5-18, which is a well known SID for in built user –

SYSTEM. The final list of registry keys that we are concerned with should look 

something like this.

HKCR\.pot

HKCR\.pps

HKCR\.ppt

HKCR\Installer\Features\9040FA0900063D11C8EF10054038389C

HKCR\Installer\Products\9040FA0900063D11C8EF10054038389C

HKCR\Installer\Products\9040FA0900063D11C8EF10054038389C\SourceList

HKCR\Installer\Products\9040FA0900063D11C8EF10054038389C\SourceList\ 

Media

HKCR\Installer\Products\9040FA0900063D11C8EF10054038389C\SourceList\Net

HKCR\PowerPointViewer.Show.11

HKCR\PowerPointViewer.Show.11\DefaultIcon

HKCR\PowerPointViewer.Show.11\shell

HKCR\PowerPointViewer.Show.11\shell\Print

HKCR\PowerPointViewer.Show.11\shell\Print\command

HKCR\PowerPointViewer.Show.11\shell\Show

HKCR\PowerPointViewer.Show.11\shell\Show\command

HKCR\PowerPointViewer.SlideShow.11

HKCR\PowerPointViewer.SlideShow.11\DefaultIcon

HKCR\PowerPointViewer.SlideShow.11\shell

HKCR\PowerPointViewer.SlideShow.11\shell\Print

HKCR\PowerPointViewer.SlideShow.11\shell\Print\command

HKCR\PowerPointViewer.SlideShow.11\shell\Show

HKCR\PowerPointViewer.SlideShow.11\shell\Show\command

HKCR\PowerPointViewer.Template.11

HKCR\PowerPointViewer.Template.11\DefaultIcon

HKCR\PowerPointViewer.Template.11\shell

HKCR\PowerPointViewer.Template.11\shell\Print

HKCR\PowerPointViewer.Template.11\shell\Print\command

HKCR\PowerPointViewer.Template.11\shell\Show

HKCR\PowerPointViewer.Template.11\shell\Show\command

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 8/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 6 of 19

Tasks Detailed Steps

Data\S-1-5-18\Components\ 

44A1EC8F6A3D4844B89EB4B25DA2ACE1

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Components\ 

78A0C082277ABBB4082770749C7F86DA

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Components\ 

A0A0D0E3C44EB1CDFB76A4AAA464D8DC

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Components\ 

A874C847098976648AE06316CBE4C970

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Components\ 

AC18EF598BF737D44965518454BFCFBF

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Components\ 

C9D4AA4B20E4DDF489803259E7032E55

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Components\ 

E2D3EE8A529976442B4D0857744A1744

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Components\ 

FC4944160D707244F9C43E3CBB48F64D

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Products\ 

9040FA0900063D11C8EF10054038389C

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Products\ 

9040FA0900063D11C8EF10054038389C\Features

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\ 

Products\9040FA0900063D11C8EF10054038389C\InstallProperties

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Products\ 

9040FA0900063D11C8EF10054038389C\Patches

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\User

Data\S-1-5-18\Products\ 

9040FA0900063D11C8EF10054038389C\Usage

c.  Delete all other keys from your list and save.

C:\COMPONENTIZE\Exercise\Exercise 1\Task

3\List_Of_Setup_RegistryKeys.txt 

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 9/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 7 of 19

Tasks Detailed Steps

d.  We can keep Process Monitor running, so that we can refer back to the saved state

if we needed to.

e.  Now we have all the information to build the initial version of the component.

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 10/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 8 of 19

Exercise 2Create the Application SLD 

ScenarioWe can create a skeletal component from the information obtained from Exercise 1.We could wait till we have all

the information on the component, but as a best practice let’s create the component in steps. This is where we are

going to assume some familiarity with Component Designer, so that we can quickly get through this.

Tasks Detailed Steps

Complete the following

tasks on:

GettingStartedandCusto

mComponents

1.  Create the basic

SLD structure

a.  Create an output folder C:\COMPONENTIZE\Final with two subfolders, SLD 

and REP.

b.  Open Component Designer from the shortcut on the desktop. Click File | New and

save as ppviewer2003.sld in the C:\COMPONENTIZE\Final\SLD folder.

c.  Add a new package and name it “PowerPoint Viewer 2003 Package”.

d.  Add a new repository “PowerPoint Viewer 2003 Repository” and set the Source

Path to your REP folder (Use the Browse button to navigate to your REP folder

and click OK).

e.  Add the “PowerPoint Viewer 2003 Package” as a “Group Membership” to the

“PowerPoint Viewer 2003 Repository”.

f.  Add a component called “PowerPoint Viewer 2003” and set the following

attributes

  Repository is “PowerPoint Viewer 2003 Repository”

  Check “Component instances are editable”

  Add Group Membership on the category “Software: Applications: Tools &

Utilities” and the “PowerPoint Viewer 2003 Package”.

2.  Add files to the

component

 Note: Now we can add the files, we identified in Exercise 1 to the SLD.

a.  Using files.csv as a reference, copy the files from where they are installed on the

system to the C:\Componentize\Final\REP folder. Make sure there are no

subfolders under the REP- it must have a flat folder structure.

b.  To add the files as file resources to our component right-click on Files and choose

Add Files in Folder. Navigate to the location on the system where the files are

installed and click OK, then Yes. This will add the file resources with the correct

relative path. Do this for all the files that you have identified in your files.cvs list.

 Note: The C:\Windows\Installer folder is hidden by default (but for this exercise has

been made visible)

GDIPLUS.DLL %16426%\Microsoft Office\PowerPointViewer\ 

INTLDATE.DLL %16426%\Microsoft Office\PowerPoint

Viewer\ 

PPTVIEW.EXE %16426%\Microsoft Office\PowerPoint

Viewer\ 

ppvwicon.exe %10%\Installer\{90AF0409-6000-11D3-

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 11/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 9 of 19

Tasks Detailed Steps

8CFE-0150048383C9}\ 

PPVWINTL.DLL %16426%\Microsoft Office\PowerPoint

Viewer\ 

SAEXT.DLL %16426%\Microsoft Office\PowerPoint

Viewer\ 

UNICOWS.DLL %16426%\Microsoft Office\PowerPoint

Viewer\ 

c.  One file is handles differently, and that is the .lnk file. Instead of adding this as a

file resource it needs to be added as a shortcut resource. This can be done as

follows:

d.  On the Resources node, right-click and Add | Shortcut 

e.  Set the following:

  Name =Shortcut:Microsoft Office PowerPoint Viewer 2003.lnk 

 DstName = Microsoft Office PowerPoint Viewer 2003.lnk 

  DstPath =%16407%

  TargetPath = %16426%\Microsoft Office\PowerPoint Viewer\ PPTVIEW.EXE

C:\COMPONENTIZE\Exercise\Exercise 2\Task 2\-. A predefined

SLD can be found in this folder. 

3.  Add the registry

keys to the

component

a.  Adding registry keys are easier than it looks. “Add Registry Branch” simplifies the

process by adding all the child keys and their values from the registry hives of the

system that the application is installed on. Add the following branches to the

component:

HKEY_CLASSES_ROOT\.pot

HKEY_CLASSES_ROOT\.pps

HKEY_CLASSES_ROOT\.ppt

HKEY_CLASSES_ROOT\PowerPointViewer.Show.11

HKEY_CLASSES_ROOT\PowerPointViewer.SlideShow.11

HKEY_CLASSES_ROOT\PowerPointViewer.Template.11

HKEY_CLASSES_ROOT\Installer\Features\9040FA0900063D11C8EF1005403838

HKEY_CLASSES_ROOT\Installer\Products\9040FA0900063D11C8EF1005403838

HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows\CurrentVersion\Inst

S-1-5-18\Components\44A1EC8F6A3D4844B89EB4B25DA2ACE1

HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows\CurrentVersion\Inst

S-1-5-18\Components\78A0C082277ABBB4082770749C7F86DA

HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows\CurrentVersion\Inst

S-1-5-18\Components\A0A0D0E3C44EB1CDFB76A4AAA464D8DC

HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows\CurrentVersion\Inst

S-1-5-18\Components\A874C847098976648AE06316CBE4C970

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 12/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 10 of 19

Tasks Detailed Steps

HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\U

S-1-5-18\Components\AC18EF598BF737D44965518454BFCFBF

HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\U

S-1-5-18\Components\C9D4AA4B20E4DDF489803259E7032E55

HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\U

S-1-5-18\Components\E2D3EE8A529976442B4D0857744A1744

HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\U

S-1-5-18\Components\FC4944160D707244F9C43E3CBB48F64D

HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\U

S-1-5-18\Products\9040FA0900063D11C8EF10054038389C

C:\COMPONENTIZE\Exercise\Exercise 2\Task 3\List_Of_Registry_Branch

SLD can also be found in this folder. 

b.  We now have a skeletal component of PowerPoint Viewer 2003.

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 13/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 11 of 19

Exercise 3Static analysis of the application binaries 

Scenario

We now have all the files and registry keys needed by the component; however this is not enough to make thecomponent work. Each file owned by the component might have dependencies on other Windows files that need to

be included in the runtime. In order to ensure that the dependent files are automatically included in the runtime when

our component is imported, we need to find the files that the component files depend on. Then we can express a

dependency in our component on the component that owns those files. The tool we would be using to get the

dependencies is “Dependency Walker”, with which we will analyze each file owned by the component. You can

find it at C:\COMPONENTIZE\Tools\depends\Depends.exe

Tasks Detailed Steps

Complete the following

tasks on:

GettingStartedandCusto

mComponent

1.  Find the static

dependencies

a.  Open “Dependency Walker” by double-clicking on

C:\Componentize\Tools\Depends\depends.exe

b.  Click on Open and navigate to C:\Componentize\App. Click on ppviewer.exe.

Note the first level dependencies 

-

c.  As seen PPTVIEW.EXE depends on the following files:

  ADVAPI32.DLL

  KERNEL32.DLL

  GDI32.DLL

  USER32.DLLCOMCTL32.DLLVERSION.DLL

2.  Find the static

dependencies

 Note: Now we need to find the components that own the binaries found in Task 1. The

easiest way to find the component is using the Component Database Manager.

a.  Open Component Database Manager from the shortcut on the desktop. (If your

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 14/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 12 of 19

Tasks Detailed Steps

component designer is open, it may open in non-exclusive mode that is enough for

us.)

b.  Navigate to “Component” tab and click on the Filter button.

c.  Click on New to create a new filter and call it File Search.

d.  Double-click on the rule “Component contains the following file: [filelist]” to add

it.

e.  Double-click the rule you added to open it and enter “KERNEL32.DLL”, then OK.

f.  Apply the filter. The search could result in multiple components which own the

file.

 Note: Make a note of the component with the highest version and revision- this is thelatest version of the component. IN this case it is “Windows API – Kernel [Version

5.1.2600.5512, R5512]”.

3.  Get the total list of 

dependency

components

a.  Repeat task 2 for all the files listed in the top level of Dependency Walker. Then

look up the dependencies of all the other files that make up our PowerPoint Viewer

component and find their owning components (repeat task 1 and 2 for all files).

 Note: When complete the result set should look something like the following table.

 X - Axis: List of Binaries for PowerPoint 2003 Application

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 15/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 13 of 19

Tasks Detailed Steps

Y – Axis: Complete list of binary dependencies of the application binaries.

Binary

Dependency

   A   D   V   A   P   I   3   2 .   D   L   L

   K   E   R   N

   E   L   3   2 .   D   L   L

   G   D

   I   3   2 .   D   L   L

   U   S   E

   R   3   2 .   D   L   L

   C   O   M   C

   T   L   3   2 .   D   L   L

   V   E   R   S   I   O   N .   D   L   L

KERNEL32.DLL X X X X X X

GDI32.DLL X X

ADVAPI32.DLL X X X X

NTDLL.DLL X X X X X

RPCRT4.DLL X

SECUR32.DLL X

BCRYPT.DLL X

USER32.DLL X X X

MSIMG32.DLL X

PPOWRPROF.D

LLX

WINSTA.DLL X

MSVCRT.DLL X

 Note:

 X Indicates dependency.

C:\COMPONENTIZE\Exercise\Exercise 3\Task

3\Complete_List_Of_Binary_Dependencies.txt 

b.  Now we can find the components that own all these binaries.

Binary

Dependency

Owning

Component

KERNEL32.DLL Windows API – Kernel [Version 5.1.2600.5512, R5512]

GDI32.DLL Windows API – GDI [Version 5.1.2600.5512, R5512]ADVAPI32.DLL Windows API – Advanced [Version 5.1.2600.5512, R5512]

MSVCRT.DLLAVisual C++ Runtime Libraries XPSP3 [Version

5.1.2600.5512, R5512]

USER32.DLL Windows API – User [Version 5.1.2600.6000, R6000]

POWRPROF.DLL Primitive: Powrprof [Version 5.1.2600.5512, R5512]

WINSTA.DLL Primitive: Winsta [Version 5.1.2600. 5512, R5512]

VERSIONCOMCTL PrimitiveCommon Control Libraries : Version XPSP3

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 16/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 14 of 19

Tasks Detailed Steps

32.DLL [Version 5.1.2600. 5512, R5512]

VERSION.DLL Primitive: Version [Version 5.1.2600. 5512, R5512]

NTDLL.DLL Primitive: Ntdll [Version 5.1.2600. 5512, R5512]

RPCRT4.DLL RPC Local Support [Version 5.1.2600. 5512, R5512]

SECUR32.DLLPrimitive: Secur

3 [Version 5.1.2600. 5512, R5512]BCRYPT.DLL

MSIMG32.DLL Primitive: MSIMG32 [Version 5.1.2600.5512, R5512]

C:\COMPONENTIZE\Exercise\Exercise 3\Task

3\Dependent_Components.txt c.  GDIPLUS.DLL is a special case. This file in owned by our component and also it

is owned by the component GDI+ XPSP3 [Version 5.1.2600.5512, R5512]. These

two files could be different versions of the same file, so it is better give preference

to the file installed by our component. We give preference to our component, sowe will NOT add GDI+XPSP3 as a component dependency in our PowerPoint

component. Note that

4.  Update the

component with the

dependency

components

a.  Open ppviewer2003.sld using Component Designer. 

b.  Right-Click the Component or Group Dependency node and Add | Component

Dependency.

c.  Search for or browse to each of the components you have identified in the previous

task and add by double-clicking. 

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 17/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 15 of 19

Exercise 4Optional - Dynamic analysis of Application dependencies 

Scenario

Even though we have done static analysis of the application binaries it may not be enough for every application,because the application can have non-intuitive dependencies on other binaries or use previously undiscovered

registry keys when it is running. In dynamic analysis we monitor the application while it is running and try to catch

any additional dependencies.

Generally this analysis is only done after initial testing of your application component in a runtime image, when

problems are encountered with the functionality.

Tasks Detailed Steps

Complete the following

tasks on:

GettingStartedandCusto

mComponents

1.  Monitor application

activity using

Process Monitor

a.  Open process monitor and rest the filter. 

b.  Create a new filter to monitor only pptview.exe. 

c.  You will find a .ppt file and a .pps file in the folder C:\COMPONENTIZE\Files.

d.  Open PowerPoint Viewer 2003 from Start | All Programs and open the test files. 

e.  After trying various combinations stop the viewer and stop the capture of Process

Monitor

2.  Get the list of files

loaded by the

application

a.  Set a filter for “Operation not equal to load image then exclude” to get a list of 

files loaded by the application 

b.  Now set a Unique constraint on the path, and see that a lot of files are loaded

which were not part of the application or found by static analysis. These are the

runtime, or dynamic dependencies of the application 

c.  Note that dynamic dependencies may vary with each operation you perform withthe application. Hence it is essential to cover all the process paths typical to your

use.

d.  The list of files could be large-look at the file

C:\COMPONENTIZE\Exercise\Exercise 4\Task 

2\Dynamic_Library_Load_List.txt. However, most of the files loaded might be

primitive files which will be brought in automatically to any embedded runtime

image that you create. In this case it is not necessary to add Component

Dependency on them. 

e.  Let’s select the following files from the 56 files identified and find the component

that own them like in the previous exercise 

Binary

Dependency

Owning

Component

comctl32.dll  Common Control Libraries Version XPSP3 [Version

5.1.2600.5512, R5512]

browseui.dll  Primitive: Browseui [Version 5.1.2600. 5512, R5512]

apphelp.dll  Application Compatibility Core [Version 5.1.2600.

5512, R5512]

cscui.dll  Shell Namespace Extensions [Version 5.1.2600. 5512,

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 18/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 16 of 19

Tasks Detailed Steps

R5512]

davclnt.dll Webdav Client Redirector [Version 5.1.2600. 5512,

R5512]

drprov.dll Terminal Services Core [Version 5.1.2600. 5512,

R5512]

linkinfo.dll Shell Namespace Extensions [Version 5.1.2600. 5512,

R5512]

C:\COMPONENTIZE\Exercise\Exercise 4\Task

2\Dynamic_Load_Components.txt f.  The list of Dynamic loads will differ with the code paths executed.

g.  Just to re-iterate that some of component identified might not be useful in your

specific scenario and may cause a huge foot print hit. If your primary concern is

foot print, look to prune some of the files in each step of the processes above.

h.  Update the component with the dynamic dependencies we just identified.

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 19/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 17 of 19

Exercise 5Optional - Create a resource component 

Scenario

Even though we have done static analysis of the application binaries it may not be enough for every application,because the application can have non-intuitive dependencies on other binaries or use previously undiscovered

registry keys when it is running. In dynamic analysis we monitor the application while it is running and try to catch

any additional dependencies.

Generally this analysis is only done after initial testing of your application component in a runtime image, when

problems are encountered with the functionality.

Tasks Detailed Steps

Complete the following

tasks on:

MACHINENAME

1.  Add component

“PowerPoint Viewer

2003 Resource” to

ppviewer2003.sld

a.  Copy the test files from C:Componentize\Files\PPV2003_Test_PPT.ppt and

PPV2003_Test_PPS.pps to the REP folder of your component. Both components

will share the same repository.b.  Add a new component “PowerPoint Viewer 2003 Resource” to the component list

with the following attributes

  Change repository to “PowerPoint Viewer 2003 Repository”

  Check “Component Instances are editable”

c.  Add Group Membership to “PowerPoint Viewer 2003” package and to Software:

Applications: Tools & Utilities”

d.  Add both ppt and pps to the Files node and change their effective path to desktop

(%16409%). You can do this by double-clicking on each file resource in the

component and then settings the Destination field.

e.  Add a Component Dependency on the “PowerPoint Viewer 2003” component.

You can select the component in the SLD file by selecting SLD radio button ratherDatabase.

f.  Save the SLD.

g.  Now we are ready to deploy.

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 20/21

Componentizing Applications End To End using Windows Embedded Standard 2009

Page 18 of 19

Exercise 6Deploy and test the new component 

Scenario

We have come to the final steps of the process. Let us create runtime with our new component, deploy it and test it.

This is an optional exercise. Please proceed only if you still have time. We are assuming familiarirty with respect to

importing a SLD to the component database, creating and deploying a new runtime image.

Tasks Detailed Steps

Complete the following

tasks on:

MACHINENAME

1.  Import the

component to the

Component

Database

a.  Close all the windows of Target Designer and Component Designer, if open. 

b.  Open Component Database Manger 

c.  Import the SLD to the database 

d.  Verify that all the components are imported. Also verify that a new repository is

created with all our files in it. e.  Close Component Database Manager

2.  Create a new

Runtime

a.  Open Target Designer from the shortcut on the desktop, and create a new

Configuration with Target Device Setting set to boot in the ‘D’ drive. Something

like this: 

Boot drive (more info) C:

Windows folder (more info) D:\WINDOWS

Program Files folder (more info) D:\Program Files

Documents and Settings folder (more

info)

D:\Documents and Settings

Boot ARC path (more info) multi(0)disk(0)rdisk(0)partition(2)

b.  Add the Virtual PC 2007 Helper Macro component.

c.  Add the Runtime Quick Start Helper Macro component. 

d.  Navigate to Software | Applications | Tools & Utilities and check both our

components are present 

e.  Add the “PowerPoint Viewer 2003 Resource” component alone 

f.  Check dependency. Our second component should be brought into the

configuration. 

g.  Resolve errors in the Task pane, if any, and re-run a dependency check. 

h.  Save the slx to C:\Componentize. 

i.  Build Image to C:\Windows Embedded Images. Overwrite any previous build in

that location.

 j.  Before continuing, clean up the lab folders you created:

k.  Delete the C:\Componentization folder

l.  In Start | Control Panel | Programs and Features, uninstall Microsoft PowerPoint

Viewer

8/8/2019 Comp on en Ti Zing Applications End to End Using Windows Embedded Standard 2009

http://slidepdf.com/reader/full/comp-on-en-ti-zing-applications-end-to-end-using-windows-embedded-standard 21/21