AccuTerm/QM USB Stick Demo

AccuSoft Enterprises and Ladybridge Systems jointly demonstrated an “application on a stick” at the 2008 International Spectrum conference. This allows a user to carry an entire MultiValue application and AccuTerm on a USB stick (or other portable device) and run the application without installing anything on the host PC.

Download the latest version of the USB Stick demo to learn how to utilize this novel approach for your own projects.

Technical details

Installing QM

Follow the current installation instructions for installing QM on a USB stick. At the time this article was written, you need to run usbconfig.exe manually before installing QM on a USB drive (download from the OpenQM downloads page). Usbconfig.exe writes a ‘memstick’ file to the root directory of the USB drive which will then permit QM to be installed on the drive. We recommend installing QM in the default directory (QMSYS) directly off the root of the drive. This will simplify deployment of the project.

When QM is installed on a USB drive (the “USB memory device” option was selected during install), paths stored in QM use a variable to reference the drive letter of the QM installation (@DRIVE) instead of a hard-coded drive letter. This allows QM to run correctly when the drive letter of the USB device changes (as when plugged into a different PC host).

At the end of the installation process, you will need to enter a QM license number. You can enter ‘PERSONAL’ for a personal version of QM, and you can update the license at a later time if this is a commercial application – just log in to QMSYS on the USB drive and enter ‘UPDATE.LICENCE’ at the command prompt.

The QM installer will create a configuration file called ‘qmconfig’ in the QMSYS directory. Please refer to the QM documentation regarding Configuration Parameters for details about this file. If you plan on deploying your “portable” application on a PC host which might already have QM running, you might want to specify your own port numbers for the telnet server (PORT=xxx) and QMClient server (CLIPORT=xxx) in the ‘qmconfig’ file.

Installing AccuTerm

To install AccuTerm 7 on the USB drive, run the AccuTerm installer and select the “portable” install option. When selecting the destination directory, choose the USB drive. We recommend installing AccuTerm in the default directory (atwin70) directly off the root of the USB drive. When the installation is complete, you can enter an activation key if you have one available (including the QM AccuTerm bundle key). If you do not enter a key, AccuTerm will run in evaluation mode.

To complete the AccuTerm installation, you need to create a new AccuTerm session, so its now time to start the QM telnet server so your session has a host to connect to. To start the server, double-click the qmusbsrvr.exe file in the D:\QMSYS\bin directory (assuming D: is the USB drive letter). Then browse to the D:\atwin70 directory and double-click the atwin70.exe file to start AccuTerm. Create a new session: select ‘telnet’ as the connection type, ‘localhost’ as the host name, ‘QM’ as the host type, and enter the port number you have configured for the QM telnet server (4242 by default). At this point, you should be able to log in to the QMSYS account on the USB device and add your application account(s) and the install the AccuTerm host programs in the ACCUTERM account. Save your session file in the default location (D:\atwin70\UserData).

Installing the AccuTerm Host Programs

With the QM USB telnet server (qmusvsrvr.exe) still running, use the session created above and log in to the QMSYS account on the USB drive. To create and initialize the ACCUTERM account, at the command prompt, type CREATE.ACCOUNT ACCUTERM. Enter a path on the USB drive for the new account (D:\ACCUTERM), then LOGTO ACCUTERM to install the host programs. Before initiating the host program installation process, be sure to disable case inversion (PTERM CASE NOINVERT). Initiate the host program installation from the AccuTerm MultiValue menu (MultiValue -> Host Programs -> Install).

Installing the Application Accounts

While there are several ways to add your application accounts to the USB drive, the simplest method is to simply copy the account directory from its current location to the root of the USB drive. Then, while logged in to the QMSYS account, type CREATE.ACCOUNT and enter the correct path to the account directory. Next, use UPDATE.ACCOUNT from QMSYS (updates all registered accounts) or from your application account (only updates the application account) to update the VOC and system file locations.

You will need to re-catalog any locally catalogged programs in your application account because paths in the VOC entries refer to locations of the original files. The updated VOC entries for catalogged programs will use @DRIVE instead of a hard-coded drive letter so that the programs will execute properly if the drive letter of the USB drive is different.

Launching the Application

To create an integrated startup file for you application-on-a-stick, you can create a .bat file (Windows batch file) that starts the QM telnet server, starts AccuTerm, opens the AccuTerm session, and optionally logs on to the application account. The .bat file should be placed in the root directory of the USB drive. It requires only a single line:

"%CD%\qmsys\bin\qmusbsrvr.exe" -m "%CD%\atwin70\atwin70.exe demo.atcf"

This command uses the CD environment variable (current directory) to construct a command line for qmusbsrvr.exe, which accepts an as a command line argument the name of another command to execute once the server process is running. In this way the lifetime of the qmusbsrvr.exe process is tied to the AccuTerm process – qmusbsrvr terminates after AccuTerm terminates.

The AccuTerm command line itself has an argument – demo.atcf – in the above example, which tells AccuTerm the name of the session file (or layout or script) file to launch upon startup. To automatically log on to your application account, use a login script (.atcf) for the AccuTerm command line. The script can open the session file then automate the login process (see sample login1.atcf script in the atwin70\samples\scripts directory for an example).

Licensing issues

When planning your application-on-a-stick strategy, please keep in mind that both QM and AccuTerm are licensed commercial products, and be sure to abide by the terms of the respective license agreements. If you have questions about licensing of QM or AccuTerm, please contact Ladybridge Systems (QM) or Zumasys.