A portable installation means that the setup program will copy all files the application needs on a portable device like a flash memory card or USB memory stick. No changes can be made to the host computer. This means that the Identity, Registry and File Types and settings are automatically ignored for portable installations. Portable installations also cannot depend on 3rd party installations. If you’ve added anything to the 3rd Party tab, DeployMaster will not show the Create Portable Installation button in the setup program.

Because portable installations make no changes to the host computer, they do not require administrator privileges like regular installs. Any user, even restricted users that normally can’t install software, can use the Create Portable Installation button in your installer to copy its files into any folder that they can write to. This can be a USB stick but also a personal folder on a hard disk.

Of course, for a portable installation to really be portable, your application must be able to run in a portable manner. It must be able to detect that it was installed portably. If so, it must save all its settings onto the drive it is being run from, and still find that information when the drive letter changes (e.g. when the device is plugged into another computer). Saving everything in the same folder as your .exe file is an easy solution. (While this is a big no-no when your application is installed into c:\Program Files\, it’s fine when installed on a personal storage device.) Your application must also keep its hands off the registry and the user’s desktop. So it cannot create any shortcut icons or file associations.

If your application is ready to be portable, you can select the “user choice” or “always” option on the Portable tab in DeployMaster. In case of user choice, the Immediate Installation button and Advanced Installation button in the setup’s welcome screen will do a regular hard disk installation, creating all shortcuts, file associations, etc. The Custom Installation button will be replaced by the Create Portable Installation button. This button will copy your files onto the removable device, without doing anything else. Removing one button prevents button overload, while still allowing component selection through Advanced Installation.

DeployMaster can make it easy for your application to detect that it should act in a portable manner by creating a file RemovableDrive.sys in the installation folder on the removable device. Your application can then check for the existence of this file whether it should act as if it was installed on something portable, or on the computer’s internal hard disk. Choose “never” if you don’t want this file, or “always” to always create it for portable installations. You can use the middle option to make DeployMaster only create the file when you allow portable installations on hard disks or other devices that don’t report themselves as removable.

Certain devices, like USB hard disks, do not report themselves as removable when queried by the GetDriveType() Win32 API call, even though they physically are. By default, the setup program will list only those drives that report themselves as removable via GetDriveType(). If you turn on the option to allow portable installations on any drive, the setup program will show a checkbox to allow the user to choose any drive to install on, including the C: drive and even mapped network drives. If you choose to allow this, and your application can either be installed portably or a traditionally into c:\Program Files, you should turn on the RemovableDrive.sys option so your application can determine which choice the user made. Some users may want to have a portable installation on an internal hard disk, e.g. to use the same installation in multiple versions of Windows on a multi-boot system, or to keep the installation easily synchronized or backed up using folder synchronization software.

Finally, you can specify a default installation folder. Portable installations ignore the folder settings on the Project tab. They also ignore all folder structures on the Files tab, except for %APPFOLDER%. The %APPFOLDER% folder structure is created under the installation folder on the removable device. All other files are copied directly into that installation folder. The installation folder is created directly in the drive’s root folder. If you don’t set an installation folder, then the files are installed directly into the root of the device. The installation folder setting is only a default. The user can specify any folder. You cannot disable this. (Nor should you want to. Some users are funny about folder structures on their personal storage devices.)

Because the host computer must remain untouched, there will be no uninstall entry in the control panel for portable applications. The only way to uninstall will be for the user to delete your application’s file from his storage device. A clearly labeled installation folder makes this easy.

Because the host computer does remain untouched, portable installations do not require administrator rights. The setup.exe generated by DeployMaster will not request elevation or trigger any security prompts when the user clicks the Create Portable Installation button.