Configuring ICVMLT32.EXE as a Windows Service An ICVERIFY, Inc. Technical Document November 10, 2005 Disclaimer: The information contained herein is intended to apply to the ICVERIFY, Inc. software product discussed as of the date shown at the top of this document. No warranty is offered that the information will be suitable or correct for all product users and all computing environments. You retain the sole responsibility for your operation and maintenance of your software application, computer hardware, and overall payment acceptance environment. Overview This technical document is intended to help you understand how to configure the ICVMLT32.EXE application as a Microsoft Windows service. Configuring the program as a service will allow it to restart automatically on system startup and continue to process without a physical user being logged into the system, improving security and overall system robustness. The information in this procedure is adapted from Microsoft Knowledgebase article KB137890. Please refer to it and other articles for general information on configuring Windows services. Prerequisites You will need access to the following items in order to create and configure Windows services: INSTSRV.EXE a command-line utility offered by Microsoft that can be used to install services SRVANY.EXE another Microsoft utility used to launch an executable application as a service Access to and familiarity with the Windows system registry. Furthermore you must already have installed the ICVERIFY for Windows product, and run some test transactions through ICVMLT32.EXE to ensure it is working properly. This procedure will not work unless ICVMLT32.EXE is properly installed and initialized at least once. INSTSRV.EXE and SRVANY.EXE are not part of a typical Windows operating system installation. You may need to retrieve the appropriate version of the utility for your operating system directly from Microsoft, or from the following packages: Windows NT 4.0 / Windows 2000: Use the INSTSRV.EXE and SRVANY.EXE from the Windows NT Resource Kit. Windows XP / Windows 2003 Server: Use the INSTSRV.EXE and SRVANY.EXE from the Windows 2003 Resource Kit Tools. As of this writing, you can download both Resource Kit packages from http://www.microsoft.com. Page 1
Procedure When you have fulfilled the prerequisites, follow this procedure to configure ICVMLT32.EXE as a Windows service. Step Action 1. If you have not done so already, install the appropriate Resource Kit and ensure that INSTSRV.EXE and SRVANY.EXE are installed. Make a note of the directory path of both utilities. 2. From the Start menu, select Run and type cmd <enter> to reach a command prompt. 3. From the command prompt, type INSTSRV and press <enter>. If INSTSRV.EXE is properly installed, it should display some information regarding its usage, beginning with the phrase: Installs and removes system services from NT 4. Now that we ve established INSTSRV.EXE is installed, we need to specify SRVANY.EXE as a launching tool for the ICVMLT32.EXE application. This is done by the following syntax: INSTSRV.EXE <servicename> %path%\srvany.exe For example, if you ve installed the Windows 2003 Resource Kit in its default location, %path% would be as follows: C:\Program Files\Windows Resource Kits\Tools Remember to use quotation marks if your path has any spaces in it. We will use the name ICVMLT32 as our service name. So, let s say SRVANY.EXE is in the WINDOWS\SYSTEM32 directory. You would therefore type: INSTSRV.EXE ICVMLT32 C:\WINDOWS\SYSTEM32\SRVANY.EXE <enter> If the utility ran successfully, you should see the response: The service was successfully added! 5. Next, we need to configure the system settings for the service. Close the command window and go to the Windows Control Panel. Enter the Services control. It may be under your Administrative Tools group, depending on your version of Windows. See Figure 1. Page 2
Figure 1 Services Control Windows XP Control Panel 6. We need to adjust the properties of the ICVMLT32 service. Depending on your operating system, you may need to highlight the service and click the Startup button on the right of the dialog box. In Windows XP (our example), you can simply rightclick the ICVMLT32 entry and select Properties from the pop-up context menu. See Figure 2. Page 3
Figure 2 ICVMLT32 Service Properties General Tab 7. It is generally advisable to ensure the service is set to Automatic startup. This ensures the service will start when the computer is first turned on. Next, we need to specify the user account under which the service will run. Depending on your version of Windows, this information may be in the same dialog box. In our Windows XP example, you need to click on the Log On tab. See Figure 3. Page 4
Figure 3 ICVMLT32 Service Properties Log On Tab 8. Here, you should select a user account for the service to use. The account you specify must have full read-write-execute permissions to the shared request-answer file folder you intend to use to process transactions. Often, the system account will suffice. If you are not sure which account you should use, consult your Windows network administrator. The next step is an optional one and may not be possible on your version of Windows. Windows XP and 2003 allow to you specify what you want the computer to do if the service fails for some reason. See Figure 4. Page 5
Figure 4 ICVMLT32 Service Properties Recovery Tab 9. If you wish your system to attempt to restart the ICVMLT32 service if it ever fails, you can select the Restart the Service option in the First failure drop-down menu. Subsequent failures of the service may indicate a more serious problem with your system, therefore it is not advised to select the same option for the second or subsequent failures. Now that you have configured the service parameters, you need to associate the ICVMLT32.EXE application with the SRVANY.EXE utility so that the ICVMLT32 can invoke ICVMLT32.EXE by means of SRVANY.EXE. To do this, we will need to edit the system registry. To launch the registry editor, first close the Control Panel, saving any changes you made to the ICVMLT32 service. Then click Start, Run and type in regedit <enter>. This launches the Windows Registry Editor. See Figure 5. NOTE: Be very careful when you edit the Windows registry. It is possible to cause problems that may damage your operating system beyond repair if you make mistakes editing it. Page 6
Figure 5 Windows Registry Editor 10. When in the Registry Editor, select HKEY_LOCAL_MACHINE, then SYSTEM, then CurrentControlSet, then Services. Scroll down the list of services until you locate ICVMLT32. Click that entry to see the current list of parameters on the right hand side. You will notice the SRVANY.EXE utility is specified in the registry key. We need to add some entries so that SRVANY.EXE launches ICVMLT32.EXE properly. Right-click on the right hand side of the Registry Editor and select New -> Key. This will create a new key underneath ICVMLT32. Rename this key to Parameters, then select it. See Figure 6. Page 7
Figure 6 ICVMLT32 / Parameters Subkey Windows Registry Editor 11. Now we need to create some values in this registry key. Each of the following values is a string, which means you can create each by right-clicking in the right hand side of the Registry Editor, and selecting New -> String Value from the pop-up context menu. The following are the three value names and the information you need to place in each: Create a String Value called Application. In this value, enter the full path and executable name of ICVMLT32.EXE. For example, if you installed ICVERIFY for Windows in the default directory, you would type in C:\ICVERIFY\ICWIN400\ICVMLT32.EXE. Create a String Value called AppDirectory. In this value, enter the path to the working directory of ICVMLT32.EXE. This is generally the installation directory; otherwise, it s the directory where both ICVMLT32.EXE and ICVMLT32.INI are located. If you kept the default installation settings, you would type in C:\ICVERIFY\ICWIN400. Finally, create a String Value called AppParameters. In this value, enter the characters /a (forward slash plus lowercase a.) This is the only command-line parameter ICVMLT32.EXE accepts, and tells it to use the last Page 8
configuration it started with. This is why it is critical that you successfully run ICVMLT32.EXE in application mode at least once before configuring it as a service. When you are finished, you should see the values as shown in Figure 7 following. Figure 7 Completed Parameter Entries Windows Registry Editor 12. Now the service is configured and should start properly. In order for your changes to be recognized, you need to restart the computer. When the computer is back up and running, log in and view the Windows Task Manager. The easiest way to reach the Task Manager is by typing Ctrl-Atl-Delete and selecting Task Manager from the dialog box. Click on the Processes tab and scroll through until you see icvmlt32.exe, as shown in Figure 8. Page 9
Figure 8 Windows Task Manager 13. If you want to test your service, place a request file of any kind in the request directory, or run a transaction from a substation. Your service should pick up and process the file as normal. Page 10