How do I install a package on a USB drive?


ImportantThe following article uses options that are available starting with the Enterprise edition and project type.

In this tutorial, you will be guided step by step in the creation of a package to be installed and updated on a USB drive. For this, the first step would be to configure the package so that it permits installation an a USB device, and second, its update should permit updating on a USB drive.

1. Create the installer project

Start an Enterprise project, as you would usually do. The first step is to make sure the selection of the removable drive is visible in the GUI. For this, go to the Dialog Editor Page page and:

  • select the "BrowseDlg" dialog
  • select the "Directory Combo" control
  • in its Properties pane set the "Removable Volume" flag to "True".

Now you can build the project and you will have a package ready to be installed on any USB device.

In order to configure the updater so that it will update even the USB installed application you should start by following the Using the Updater article.

2. Create and customize the update project

Further on, you need to create your Updates File, by following the Create Updates File article.

Usually the updater works by verifying the version registry in order to check weather the application is up to date. Since your application is installed on a USB, there will be no registry to check. So, the check must be done on another resource from the package. For this, you need to add more settings to the update project. For this, go to the Update Installed Detection Tab and:

  • select "file version search" in the "Detect if the update is already installed by running a" option
  • use the ProductCode and ComponentId method for the "File Path" field

Installed detection

By doing so, the install detection will be performed by running a file version search. The file must be present in order for the update process to be considered successful. It corresponds with the "FilePath" key from the Updates Configuration File.

TipYou can get the package product code (ProductCode) from Product IDs Tab and the ComponentID (GUID) from the Organization Page -> Component Properties.

Caution!You should choose a ComponentId of a component that doesn't get changed from one version to the next. Also, the key file of the component should be a file that supports versioning.