Compartilhar via


Package Scanner Technical Reference (Standard 7 SP1)

7/8/2014

Package Scanner is a command-line tool in Windows Embedded Standard 7 that you can use to scan existing Standard 7 images, both running and not running, to make it easier to service these images.

Package Scanner can be used to do the following:

  • Enumerate an existing Standard 7 image to identify the packages currently installed.
  • Identify which updates are applicable to an existing Standard 7 image.
  • Locate updates installed on a Standard 7 image, updates which have been superseded by newer updates, and therefore can be uninstalled.

Note

Package Scanner can only be run on Standard 7 images. Attempting to run Package Scanner on a non-Standard 7 image will result in an error message.

Where to Find Package Scanner

The default location for the 32-bit version of Package Scanner is [system drive]:\Program Files\Windows Embedded Studio\Tools\Image Configuration Editor\pkgscn.exe.

The default location for the 64-bit version of Package Scanner is [system drive]:\Program Files\Windows Embedded Studio\Tools\x64 Apps\Apps\Pkgscn.exe.

Note

If you need to access Package Scanner on a network share or on a device without network capability, the correct files and directory structure are required for Package Scanner to function. For more information, see CopyPkgScn Command-Line Options

Package Scanner Command-Line Options

Package Scanner command-line options use the following conventions:

pkgscn.exe { /help | /Get-Packages | /Find-Scavenge | /Find-Updates[:type]} [parameters]

The following syntax shows the valid syntax used for each Package Scanner operation type:

pkgscn/help

pkgscn {/Get-Packages | /Enum} [**/Image:**image_path | /ConfigSetDir:configset_path | **/WinDir:**windows_path | **/Logpath:**log_path | /Quiet]

pkgscn {/Find-Scavenge | /Scavenge} [**/Image:**image_path | **/WinDir:**windows_path | **/ConfigSetDir:**configset_path | **/LogPath:**log_path | /Quiet]

pkgscn {/Find-Updates*[:type] |* /Fau*[:type] }***/PackagePath:package_path [/Image:**image_path | **/WinDir:**windows_path | /All | **/ExclusionFile:**exclusion_file_path | **/ScratchDir:**scratch_directory | **/ConfigSetDir:**configset_path | **/LogPath:**log_path | /Quiet]

Operation

Description

pkgscn/help

Displays the list of available Package Scanner commands and parameters.

pkgscn/Get-Packages {/Image:image_path | /ConfigSetDir:configset_path | /WinDir:windows_path | /Logpath:log_path | /Quiet}

pkgscn/Enum {/Image:image_path | /ConfigSetDir:configset_path | /WinDir:windows_path | /Logpath:log_path | /Quiet}

Scans a Standard 7 image and enumerates the currently installed packages, which includes packages added by Deployment Image Servicing and Management (DISM) and any applied updates.

/Image:image_path

Specifies the path to the Standard 7 image you want to scan. If this option is not used, Package Scanner will attempt to scan the currently running operating system.

/ConfigSetDir:configset_path

Creates a configuration set and answer file (AutoUnattend.xml) in the specified directory that includes all packages installed in your Standard 7 image.

Ff793619.note(en-US,WinEmbedded.60).gifNote:
This answer file does not include any customized settings or third-party files.

/WinDir:windows_path

Specifies the path to the Standard 7 Windows directory. If this parameter is not used, the default of \Windows is assumed. Cannot be used together with the /Image option.

/LogPath:log_path

Specifies the path and file name for logging of the scan information.

No log file will be created unless this parameter is specified.

/Quiet

Suppresses all output other than error messages.

pkgscn/Find-Scavenge [/Image:image_path | /WinDir:windows_path | /ConfigSetDir:configset_path | /LogPath:log_path | /Quiet]

pkgscn/Scavenge [/Image:image_path | /WinDir:windows_path | /ConfigSetDir:configset_path | /LogPath:log_path | /Quiet]

Scans a Standard 7 image to locate installed packages that have been superseded by newer packages.

/ConfigSetDir:configset_path

Creates an answer file (AutoUnattend.xml) in the specified directory that includes all packages in the scanned Standard 7 image indentified as being superseded.

Ff793619.note(en-US,WinEmbedded.60).gifNote:
This answer file does not include any third-party files.

/WinDir:windows_path

Specifies the path to the Standard 7 Windows directory. If this parameter is not used, the default of \Windows is assumed. Cannot be used together with the /Image option.

/LogPath:log_path

Specifies the path and file name used for logging scan information.

No log file will be created unless this parameter is specified.

/Quiet

Suppresses all output other than error messages.

pkgscn /Find-Updates[:type]/PackagePath:package_path {/Image:image_path | /WinDir:windows_path | /All | /ExclusionFile:exclusion_file_path | /ScratchDir:scratch_directory | /ConfigSetDir:configset_path | /LogPath:log_path | /Quiet}

pkgscn /Fau[:type]/PackagePath:package_path {/Image:image_path | /WinDir:windows_path | /All | /ExclusionFile:exclusion_file_path | /ScratchDir:scratch_directory | /ConfigSetDir:configset_path | /LogPath:log_path | /Quiet}

Scans a Standard 7 image and collection of update files to identify which updates are applicable to the selected image.

package_path

The location of the update files. These files can be in either the .CAB or .MSU formats. Multiple paths can also be provided, each separated with a semicolon (;).

/ConfigSetDir:configset_path

Creates a configuration set and answer file (AutoUnattend.xml) in the specified directory that includes all packages in the scanned Standard 7 image indentified as being superseded.

Ff793619.note(en-US,WinEmbedded.60).gifNote:
This answer file does not include any third-party files.

/ExclusionFile:exclusion_file_path

Specifies the path of an XML or text file that will exclude update folders or files from the scan.

/WinDir:windows_path

Specifies the path to the Standard 7 Windows directory. If this parameter is not used, the default of \Windows is assumed. Cannot be used together with the /Image option.

/LogPath:log_path

Specifies the path and file name for logging scan information.

No log file will be created unless this parameter is specified.

/Quiet

Suppresses all output other than error messages.

Package Scanner Exclusion Files

An exclusion file is used to tell Package Scanner which update folders or files should not be considered when using /Find-Updates to find the applicable updates for an image.

Exclusion files can be text or XML files; it is recommended that you have a .txt or .xml file extension. Both files allow one entry per line.

The text file format is as follows:

|This is a text exclusion file
c:\updates\ExcludedUpdateFolder\
c:\updates\QuestionableUpdateFolder\unwantedupdate1.cab
c:\updates\QuestionableUpdateFolder\unwantedupdate2.msu
…\myrelativepath\

The XML file format is as follows:

<?xml version="1.0" encoding="utf-8"?>
<!--This is an xml exclusions file-->
<configuration>
   <exclusionlist>
      <exclusion path="c:\updates\ExcludedUpdateFolder\"/>
      <exclusion path=" c:\updates\QuestionableUpdateFolder\unwantedupdate1.cab"/>
      <exclusion path=" c:\updates\QuestionableUpdateFolder\unwantedupdate2.msu"/>
      <exclusion path="..\myrelativepath\"/>
   </exclusionlist>
</configuration> 

See Also

Concepts

CopyPkgScn Command-Line Options