Job Management Partner 1/Software Distribution Automatic Installation Tool Description and Reference

[Contents][Glossary][Index][Back][Next]

Appendix D.2 Creating a recorder file

To create a recorder file:

  1. Note the installation sequence.
    Start the installer for the software you want to remotely install, and identify the installation sequence.
  2. Use Visual Test to create a recorder file.
    According to the installation sequence you have identified, use the Test Basic language of Visual Test to create the source recorder file. Then, compile this source file to create a recorder file applicable to JP1/Software Distribution.
  3. Add the recorder file to the Packager.
    Install the created recorder file into the Packager.
Organization of this subsection
(1) Identifying the installation sequence
(2) Configuration of a recorder file
(3) Creating a recorder file with Visual Test
(4) Adding the recorder file(s) to the Packager

(1) Identifying the installation sequence

Start the installer for the software you want to remotely install, and identify the installation sequence. Should the installer not normally function, the software cannot be remotely installed under JP1/Software Distribution.

If the software to be remotely installed is compatible with the Windows Installer, you should customize the software installation windows so that a dialog box only appears upon completion of installation and upon error detection. This customization reduces the number of installation steps you need to identify, and facilitates recorder file creation.

Check the following items to identify installation steps separately for each OS, and record those steps on a paper sheet.

(a) Sequence and attributes of the dialog boxes displayed during installation

Check what operations the installer requests you to do in what sequence. Repeat the installation several times to check and list the following items:

Note that the operations may change depending on the installation method, the destination machine's condition (the operating system, amount of free disk space, available memory, and existing software). You need to check up elaborately.

Table D-1 lists an example for installing Acrobat Reader 5.05.

Table D-1 Sequence for installing Acrobat Reader 5.05

# Text Class name Operations Attribute (parent or child) Parent window Remarks
1 Set up Adobe Acrobat Reader 5.05 #32770
  • None.
Parent None -
2 Choose Destination Location #32770
  • Click Browse (&R) for the first time.
  • Click Next (&N) for the second time.
Parent None This dialog box is displayed for the second time after item 4.
3 Destination Directory #32770
  • In Path, set the installation path.
Child Item 2 Only displayed when you change the destination location.
4 Set up #32770
  • Click OK.
Child Item 3 Only displayed when you change the destination location.
5 Set up is Complete #32770
  • Select No, I will restart my computer later.
  • Click Finish.
Parent None -

Legend:
-: Not applicable

(b) Checking up the attribute of each dialog box

The recorder file is to be written in the Test Basic language of Visual Test. For button presses, character inputs, key presses, and all other operations, use the functions provided by Visual Test. For these functions, arguments are required. You are required to specify dialog box attributes such as the dialog box window handle, window class, and title text. To check up the attributes of the dialog boxes listed in (a) above, we recommend that you use the Window Information tool of Visual Test.

For details about the Window Information tool of Visual Test, see its manual.

(2) Configuration of a recorder file

The following is an example of a well-structured recorder file. Normally, create only the shaded portions according to the installer for the software you want to install.

Figure D-2 Example of configuring a recorder file

[Figure]

When you create the target processing, we recommend that you take into account that the installation may be suspended because the user responded to a dialog box, or used the keyboard or mouse by mistake. The following shows an example of the recorder file procedure.

Figure D-3 Example of processing a recorder file

[Figure]

The recorder file repeats finding each dialog box in the loop. Therefore, if the user responds to window A by mistake and window B appears, the recorder file skips the operations on window A and performs the operations on window B.

When you create a recorder file, check the windows to be displayed, and make a listing of the operations on the windows. This structure can complete the processing regardless of the sequence of the displayed windows and the user's actions made by mistake.

(3) Creating a recorder file with Visual Test

Code the recorder file in the Test Basic language of Visual Test according to the installation sequence you noted. First, use the Scenario Recorder of Visual Test to generate the installation sequence automatically. The generated code is the source of the recorder file. Then, modify the generated installation sequence, and compile the source file into a reorder file JP1/Software Distribution can use. For details about the Scenario Recorder of Visual Test, see its manual.

(a) Procedure for creating a recorder file

When creating a recorder file, combine the operations on all the dialog boxes that the installer displays.

When scripting the operations on dialog boxes, pair the following steps for each dialog box, and sequentially place the pairs of steps in a loop:

Use the WFndWindC function to find the dialog box. This function uses the Text and Class name to find the dialog box. Therefore, you must acquire the Text and Class name of each dialog box that will be displayed.

You can use the Window Information tool of Visual Test to check the dialog boxes.

The operations on dialog boxes include:

The events recorded by Scenario Recorder contain the information of the dialog boxes and the processing for the dialog boxes.

The following explains the specifications of the WFndWndC function used for finding dialog boxes in the script of the recorder file you create.

WFndWndC function
Explanation
This function attempts to find a specified window. Upon finding the window, this function acquires the window handle. You can also place the focus on the found window.
Syntax: WFndWndC(text$,classname$,[flags],[timeout&])
  • text$
    In text$, specify the text associated with a window you want to find.
  • classname$
    In classname$, specify the class name of a window you want to find. All dialog boxes have the class name #32770.
  • flags
    FW_FOCUS: Places the focus on the window found.
    FW_EXIST: Finds the window which meets find requirements. When a window is found, the function returns the window handle. Otherwise, the search fails.
    FW_ACTIVE_ONLY: Finds only the active window.
  • timeout&
    In timeout&, specify in seconds the maximum time the window search can take.
Return value
The window handle of the long type or null (0) is returned.
Notes
  • If the script attempts to activate a dialog box that cannot be activated because its child window is displayed, a runtime error occurs.
  • If the function is issued many times in a short period, it takes time to terminate.
(b) Modifications to enable the use of JP1/Software Distribution expanded functionalities

In the recorder file, you can incorporate many functions of Visual Test. However, they are not adequate for assuring a proper combination with JP1/Software Distribution. Therefore, you should use the expanded functionalities of JP1/Software Distribution. The following describes the modifications to be made to enable the user of the expanded functionalities.

Including files to enable the use of JP1/Software Distribution extended functionalities
Add a statement that includes the files provided by JP1/Software Distribution, to the end of the other $INCLUDE meta-commands at the start of the recorder file.
:
'$INCLUDE ...
'$INCLUDE 'DMPTEST.INC' 'Add here.

Adding a subroutine for using global variables that are unique to JP1/Software Distribution
To use the global variables unique to JP1/Software Distribution, you must call the DMPSTPRC subroutine. Add this subroutine to a location prior to the installer startup portion of the recorder file.
Example:
DMPSTPRC 'Add here.
'Starts the installer.
run InstallerName, nowait

Using global variables unique to JP1/Software Distribution
The global variables that are unique to JP1/Software Distribution can be used to view the installation directory name and other installation information within the recorder file. The following global variables are supported.
  • InstallerName
    An installation program name designated by InstallerName = in the installation definition file
  • InstallDrive
    An installation drive name specified by the GUI of JP1/Software Distribution. When you select the default value, the installation drive name is DEFAULT_VALUE.
  • InstallDirectory
    An installation directory specified by the GUI of JP1/Software Distribution. If you select the default value, the installation directory is DEFAULT_VALUE.
  • InstallPoint
    An installation location (full pathname including the drive name) that is derived from the combination of the InstallDrive variable and InstallDirectory variable
  • InstallUserName
    A software owner user name specified by the GUI of JP1/Software Distribution
  • InstallCompanyName
    A software owner organization name specified by the GUI of JP1/Software Distribution
(c) Compiling the recorder file

To compile the source of the recorder file that you have created:

  1. Copy the DMPTEST.INC file.
    Copy the DMPTEST.INC file to the directory that contains the recorder file.

    Figure D-4 Copying the DMPTEST.INC file

    [Figure]

  2. From the workbench of Visual Test, compile the source of the finished recorder file.
    Form the workbench of Visual Test, compile the source of the finished recorder file. When the compilation is successfully completed, the compilation result file (*.PC6 or *.PCD) is generated. This file is the recorder file that JP1/Software Distribution can directly use.

(4) Adding the recorder file(s) to the Packager

Add the recorder file that resulted from the compilation by using Visual Test to the Packager. You can add the recorder file to the Packager only by copying the recorder file that has an appropriate extension to the appropriate directory. Note that the directory for containing the recorder file can contain only the recorder file(s).

The extension varies depending on whether you can use multiple installation means. You have to use the default extension generated during compilation. The extension is *.PC6 if you have used Visual Test 6.0 for compilation with only one installation means enabled, and *.PCD if you have used Visual Test 4.0 for compilation.

The following shows the directory for containing the recorder files including the file name(s). In the pathname, RecordFileDirectory is the directory specified in RecordFileDirectory in the installation definition file.

When the software has only one installation method:
RecordFileDirectory\filename.PC6

When the software has more than one installation method:
RecordFileDirectory\filename.1
RecordFileDirectory\filename.2
RecordFileDirectory\filename.3