M100781: How to use a CD-ROM or USB Stick as a Distribution Location

Summary

Creation of a portable distribution location that requires no network connection is useful for deploying software through policy onto computers not normally on a network. This technique allows administrators to copy the LocalDeployment folder, or appropriate portions of it, to a portable storage device, and have the managed device automatically use it ahead of other distribution locations. 

Introduction

The technique covered by this article is designed to allow the managed device to download packages and optionally policy from a CD-ROM, DVD-ROM, or USB drive. For those cases where the managed device may also be on the network and able to reach normal distribution servers, we have decided for this scenario that the managed device will prefer to use the attached storage device first.

Procedure

  1. Since the storage requirements for ManageSoft distribution locations will often exceed the capacity of a CD-ROM, memory stick, or even a DVD-ROM, first select the required packages. These may be found in theLocalDeployment folder on the administration server, or in the ManageSoft\Staging\Common folder of an existing distribution server.
  2. Copy the selected packages into an appropriate directory on the portable storage device. An appropriate path starts with a root directory such as \ManageSoft\, and must conclude with the directory Packages. You could use \ManageSoft\Packages; or it may be convenient to maintain the directory structure from the source files, such as \ManageSoft\Staging\Common\Packages.
  3. Decide whether to put policies onto the storage device. Keep in mind that policies may quickly get outdated. Outdated policies may result in computers reverting to older applications. Switching between current and old policies can result in unfortunate cycles of downgrading/upgrading applications for which different releases are referenced in the different policies. Therefore, you should only put policies on the portable storage device when the managed devices cannot download its policy file from a networked server. If you decide to include policies, be sure to copy them into a subdirectory called Policies, such as\ManageSoft\Staging\Common\Policies.
  4. The managed device needs some download settings made in the registry (shown below) that will tell it to download from the portable storage media. Usually the storage maps to a drive letter on the managed device, so you need some way of populating the registry with these settings. There are two recommended techniques:
    • Where managed devices occasionally connects to the network, you can target a managed device settings package to the appropriate computers.
    • Where managed devices are completely independent of the network, there is a script attached that can make the appropriate registry settings. This script can be run (or autorun) from the portable storage device, so that the latter becomes a completely self-contained deployment system. See below for more information on the script.
  5. Also, you need to ensure that the priority of this connection to the portable storage device is not evaluated by the Net Selector mechanism. You can prevent such an evaluation by setting the preference AutoPriority tofalse, and additionally setting a very low value for the preference Priority . This will make sure that the storage media is used in preference to other distribution locations.

Attached script

Attached is a script that will detect CD or DVD drives and check for a ManageSoft folder, identifying the media as a distribution server. It can be freely modified to check any kind of device, such as USB memory sticks.

The script finds the path to the \ManageSoft\ folder name, and then sets all the information required into the registry. Note that if you choose to use a different root directory name, you will need to modify the script appropriately.

If security settings on the managed device permit it, the script can be used as an Autorun on the storage media, so that it runs whenever the media is attached to the managed device.

Recommended registry settings

The base for all of the registry keys discussed below is:
HKLM\SOFTWARE\ManageSoft Corp\Managesoft\Common\ DownloadSettings\MyLocation\

Registry Key: AutoPriority
Value: false 
Reason: We want this location to be used first, with the priority value we choose below.

Registry Key: Directory
Value: X:\Managesoft\
Reason: Base folder name – the base folder we have written to the portable storage media. The attached script can be configured to find this.

Registry Key: Host
Value: <blank> 
Reason: We want a blank host – this is not used for file protocol, as it is already implied by the directory.

Registry Key: User
Value: <blank> 
Reason: No username is necessary (we should already be able to access the portable storage media).

Registry Key: Password
Value: <blank> 
Reason: No password is necessary.

Registry Key: Port
Value: 0 
Reason: Port 0 for file.

Registry Key: Priority
Value: 1 
Reason: This should result in the portable storage device being the first chosen distribution server.

Registry Key: Protocol
Value: file 
Reason: Copying files from an existing file-based location.

Validation

If the managed device does not connect to the network, you can manually inspect for installation of applications when policy is applied from the portable storage device.

If the managed device ever connects to the network, the installation reports for applications that are in policy should eventually appear in standard ManageSoft reports.

Extensions

Recall that, in the event of deliberate or accidental damage to an installed application, self-healing may require access to the original packages. Therefore consider whether or not to leave the portable storage media containing the applications (and optionally, policy) available to the managed device at all times (for example, travelling in the bag with a notebook computer.) The only requirement of the end-user for application repair will then be to install the portable storage device (for example, inserting the disk, or plugging in the memory stick).

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk