Defining custom commands to add to a menu or toolbar > Defining a custom command to run an executable file
Expand all textCollapse all textCollapse all textCollapse all text
 
Defining a custom command to run an executable file
Use this procedure to create or later modify a custom command that will run an executable file. Executable files include these extensions: .EXE, .COM, .BAT, and .VBS. You can also identify files that are associated with known executables, such as .MPS, .JPG, and .docx.
Sample custom command definitions
This sample illustrates the entries for opening a document in WordPad.
This sample illustrates the entries for running a batch file with menu option parameters.
When this batch file is run, the parameters display in a window like the following:
1. Open the Custom Menus window.
Note: Access to the Custom Menus window is commonly located under the Maintenance menu as Custom Menu Entries. If your system administrator added the command to a different menu or toolbar, access it from there.
2. At the bottom of the existing custom commands grid, click Add.
A new row appears in the grid and the fields on the Information tab are ready for input.
Show me
3. On the Information tab, make entries in the fields as needed:
Field definitions
Note: In this table, an asterisk (*) indicates that an entry is required.
Web
By default, the File to Open field lists parameters to add to the command line in the sequence they appear in the Menu Options tab. If this check box is selected, you will need to add any parameters to the File to Open field manually.
Description*
Enter a custom command description.
Action Type*
Select the Run Program option.
Menu Text*
Enter the custom command default name as it is to appear in the menu or toolbar.
Note: If you change the display text for a custom command using the Customize dialog box, you should record the name. This can be done in the Description field.
Target*
Enter the path and filename of the program to be executed by the custom command. If needed, use the Browse button to locate the program.
File to Open
If the program specified in the Target field is to open a specific file, record the path to that file. If needed, use the Browse button to locate the file.
Credentials
If the custom command launches an application that requires access to the TMWSuite database, and you are not using Windows authentication, this field is used to enable the custom command to pass the user’s TMW login ID and password, or login ID only, as command line parameters. Select one of the following:
Include User ID and Password
Include User ID only
Additional
If the program is to process additional run-time parameters, enter them in this field, in the order and format required by the program.
4. If you want, define an icon for the command.
5. Include any additional parameters required by the command.
Note: When the program is called, it will order the parameters according to the sequence listed. If you need to change the sequence order, change the selections in the Parameters column.
How to
a. Click on the Menu Option tab.
b. At the bottom of the tab, click Add.
c. From the Parameter list, select from the available TMW system IDs.
d. Repeat steps b and c for each parameter.
6. Click Save.
A message box is displayed, notifying you that you must exit the application for the new custom menu options to become available so that you can add it to a toolbar.
7. Click OK.
At this point, a new command is not included in the list of Custom Menu commands to add to a toolbar.
Show me
In this sample, a newly created custom command to run the Windows calculator is not in the list of available commands.
8. Exit and return to the application.
The command will be added to the list of available commands.
9. Add the command to a toolbar.