The Preload Package Tool (PreloadPkgOnSite.exe) is used to manually install compressed copies of package source files on Configuration Manager 2007 sites. After package source files are installed, a status message is sent up the site hierarchy indicating the presence of the new package source files. This avoids sites higher in the hierarchy from copying package source files over the network when distribution points at child site are selected to host software distribution package content that has already been preloaded on them. In this version, it also provides a convenient way to compress the package on site server. With this functionality, it is possible to create a compressed package before transferring it across the network.

Supported Packages: Software Distribution Package, Virtual Application Package, Boot Image, Operating System Image, Operating System Install Package and Driver Package.

Supported Site Systems: Primary Site, Secondary Site (This tool can only Preload package to standard DP locate in the same machine of Primary Site or Secondary Site).

System Requirements

Supported Operating Systems: Windows Server 2003; Windows Server 2008; Windows Server 2008 R2,

System Center Configuration Manager 2007 SP2 or System Center Configuration Manager 2007 SP1

Instructions

  Copy Code
USAGE 1: PreloadPkgOnSite.exe <PkgID> [/UpdateStoredPkgVersion <StoredPkgVersion>]
						On SCCM2007 Site, with /UpdateStoredPkgVersion option presented. when <StoredPkgVersion> is positive or 0, the StoredPkgVersion will be set to the given value.
						without /UpdateStoredPkgVersion option presented
						If stored package information file is read successfully, StoredPkgVersion would be set to the given value.
						Otherwise, StoredPkgVersion will be set to Package's SourceVersion.
USAGE 2: PreLoadPkgOnSite.exe <PkgID> /Compress
	 Only used on parent site, helps to create compressed file and stored package information file.

Pre-Load package on child site

  1. Install ConfigMgr 2007 Toolkits v2 in child site or copy PreloadPkgOnSite.exe to child site directory: <ConfigMgr Installation Directory>\bin\i386.

  2. Check the option "Use a compressed copy of the source directory" under the "Data Source" tab of the Package properties in parent site. (Step 2 is used to create compressed file in parent site. See “Create compressed package” for other methods)

  3. Copy PKG or PCK file (And the .INF file if uses compress feature) under X:\SMSPKG in parent site to the child site's directory: Y:\SMSPKG.

    (Where X is the Distribution Point storage volume of ConfigMgr in parent site and Y is the Distribution Point storage volume in child site.)

  4. Rename PKG file to "<PkgID>.pck". (PkgID stands for the "Package ID" in the administration console. If it is a PCK file, the file name need not change.)

  5. Ensure the "read only" attribute of the file is set.

  6. Run the tools with option /UpdateStoredPkgVersion in child site as the specification. It would send status message to parent site.

    EXAMPLE: "PreLoadPkgOnSite.exe ABC00001 /UpdateStoredPkgVersion 1".

    (The file may fail to decompress if the StoredPkgVersion is not set correctly. It is recommended to use the tools with the option or information file. See ”How to retrieve correct stored package version” and “Compress functionality of PreLoadPkgOnSite” for details).

  7. After status message being processed on the parent site, add the child site distribution point to parent site.

    (After status message being processed on the parent site, message “Successfully update the package status” would be showed in distmgr.log on the parent site. Failure to decompress the file results in the error message “A newer version (x) of package XXX has already arrived...”in distmgr.log on the child site. To resolve this error, update the distribution point on the parent site.)

  8. Result: Successfully add the child site distribution point to the parent site without transferring package across the network.

How to retrieve correct stored package version information

The stored package version records the history information (version) of compressed package. This information is used to merge the delta file into original compressed package. Incorrectly stored package version information may cause serious package problems. The correct stored package version is the number in StorePkgVersion column of the SMS.dbo.SMSPackages table when the compressed package is created or updated.

There are many ways to retrieve StorePkgVersion:

  1. Query the database directly.

  2. Create reports from admin console.

To create reports from the admin console, use the following steps:

  1. In the SQL database, navigate to SMS_[SITE_CODE]->Views, right click dbo.v_Package, click ‘Design’, and then click ‘StoredPkgVersion’.

  2. In the admin console, navigate to Computer Management->Reporting, right click Reports, click New, and then click Report. After “New Report Wizard” is showed, click Edit SQL Statement. Change the content of the SQL statement to:

    Select Name, PackageID, SourceVersion, StoredPkgVersion from v_Package

After that, admin can easily identify the StoredPkgVersion from admin console.

You can also create a report to select the data from table directly without modified the view:

Select Name, PkgID, SourceVersion, StoredPkgVersion from SMSPackages

Create compressed package

There are three ways to generate a compressed package. Choose from the following:

  1. Check the option "Use a compressed copy of the source directory" under the "Data Source" tab of the Package properties in parent site. (Software Distribution Packages only)After transferring a package to a non-Branch DP, compressed package would be created under X:\SMSPKG where X is the Distribution Point storage volume for ConfigMgr on the parent site. All package types)Use the compress functionality of PreLoadPkgOnSite.exe (Available for all kinds of package)

  2. After transferring a package to a non-Branch DP, compressed package would be created under X:\SMSPKG where X is the Distribution Point storage volume for ConfigMgr on the parent site. All package types)

  3. Use the compress functionality of PreLoadPkgOnSite.exe (Available for all kinds of package)

After the compress operation is complete, the compressed package can be found in “X:\SMSPKG” where X is the storage column of distribution point).

Compress functionality of PreLoadPkgOnSite

Uses this feature, administrator can create a compress copy of package without referencing the StoredPkgVersion anymore. After the compress operation, an information file with StoredPkgVersion is created. After copy the compress copy and the information file to the child site, administrator can run the PreLoadPkgOnSite with default option.

  1. Install ConfigMgr 2007 Toolkits v2 on the parent site or copy PreloadPkgOnSite.exe to parent site directory: <ConfigMgr Installation directory>\bin\i386. Run the tools with option /Compress as the specification.

  2. Run the tools with option /Compress as the specification.

EXAMPLE: "PreLoadPkgOnSite.exe ABC00001 /Compress". The package is compressed without being transferred. And information file is also created.

Content of Information File

The information file contains the StoredPkgVersion retrieve from site server’s database. It prevents the admin to memorize this value when using the tool. The information file would store the message as:

[ABC00009]StoredPkgVersion: 1
Important
If admin update Distribution Point after using the compress feature, the StoredPkgVersion in database would increase, but the information file would not update with it. Admin should figure out the correct StoredPkgVersion by using guideline of “How to retrieve correct stored package version” and updating the information file’s value before using it on the child site.

Troubleshooting

This part would explain the steps of the tool to help with troubleshooting.

Working Steps of Pre-Load package on child site

  1. Retrieve necessary information from registry key (Fail message: “Failed to retrieve necessary information from registry key.”)

    [Check the registry key availability, ConfigMgr may not be installed]

  2. Connect to database

    (Fail message: “Failed to connect to Database”)

    [Check whether you have the security rights to access database.]

  3. Check PkgID exist on database

    (Fail message: “Failed to get the specified package [XXX] in the database. Please check if you have instance rights to that package.”)

    [Check whether the package information was passed down to child site. Also check whether the logon user has rights to access database.]

  4. Check whether the package path is set in database.

    (Fail message: “The compressed package path for package [XXX] is already set in the database OR this is the site where the package was created. There is no need to use this tool for this package on this site.”)

    [Check whether the package has been transferred]

  5. Check the <PkgID>.PCK exist on X:\SMSPKG with “read only” attribute

    (Fail message: “Failed to get the compressed file of package [XXX]”)

    [Check whether the package was copied to X:\SMSPKG and the “read only” attribute is set. The tool will loop through all fixed disks to find the package (read only).]

  6. Updating database information

    (Fail message:”Failed to update the StoredPkgPath in the SMSPackages table for package [XXX]”)

    [Check whether the package was deleted and whether you have rights to update the database]

  7. Forward message to parent site

    (Fail message:” Failed to update the Package Status in the PkgStatus table for package [XXX]”)

    [Check whether child site can access to the parent site]

  8. Disconnect from database

    (Fail message:” Failed to disconnect from Database”)

    [Check: None]

Important
Install pending may appear in admin console on the parent site because of wrong StoredPkgVersion value on the child site. To resolve this issue, update distribution point on the parent site. Note: the StoredPkgVersion must be correct.

Working Steps of creating compressed package

  1. Retrieve necessary information from registry key (as above)

  2. Connect to database (as above)

  3. Check PkgID exist on database (as above)

  4. Confirm the source path is set in database

    (Fail message:” Failed to get the source path of the specified package [XXX] in the database. Please check if you have set the path.”)

    [Check whether the package has source file or directory (A package without source file or directory can’t be compressed). If no source, no compression is needed.]

  5. Confirm that the compressed package was created

    (Fail message:” The compressed package [XXX] is already created. There is no need to use this tool for this package on this site.”)

    [Check whether a compressed file was created previously. Even if the compressed package has been deleted from the disk, the next step cannot run.]

  6. Compress the package and update the database(Fail message:” Failed to execute the compress action or failed to update SMSPackages table for package [XXX]”)

    [Check whether you have enough disk space for the compressed file. Confirm that the disk is NTFS formatted and fixed. The tool will loop through all disks to find a proper disk. Confirm whether you previously created a compressed package and stopped the tool while the compress operation was executing [To correct: Delete the compressed file under X:\SMSPKG]. Confirm that the package was deleted and confirm you have rights to update database]

  7. Disconnect from database (as above)

Note
The SourceCompSize in the child site’s SMSPackages table cannot be updated until the site is added as a distribution point or the package is set to “Use a compressed copy of source directory”.

Understand PreLoadPkgOnSite.exe

This part would help you to understand the workflow of PreLoadPkgOnSite.exe.

Review the steps of normal adding DP

In the very beginning, let’s review the work steps of adding DP in admin console.

The administrator only need to perform two operations: Create the package and add the distribution point. The site server will then create a compressed copy of the package in order to reduce transfer time. It will then send the package to a share folder. After transfer, the decompress operation is performed and the database is updated. A status message is sent back to the parent site that the distribution point was added successfully. Finally, the distribution point is added.

In the following scenario, the child site that had been a distribution point but the DP was deleted, but the site already has a compressed copy of the package.

After adding the distribution point, the site server finds the child site has a compressed copy so the package transfer is not needed. After decompression and processing the status message, the distribution point is added successfully.

Work steps of Using PreLoadPkgOnSite

The work steps of PreLoadPkgOnSite.exe can be separated into two parts. First the status “Add child site as DP and then delete it” is mimicked. Then the distribution point is added.

Next the compressed package is created. After compressing the package, transfer the copy (e.g. physically distribute a CD or removable disk). Once at the child site, copy the package to the share folder. Run the tools to update database. It will also send a status message. After the parent site process the message, the status of the site server is the same as “Add DP and then delete it” so the only remaining task is to add DP.