1. Add the Purify product directory and the Purify cache directory to your system Path environment variable. (Note: For a system service, it is important to add these directories to your system Path environment variable, not just your user Path environment variable.)
2. Reboot your machine so the system uses the new value. (Note: You might need to be an administrator to change these variables.)
3. Instrument the program without running it. For example, at the command line type:
purify /Run=no /Out=service_app_pure.exe service_application.exe.
4. Use Regedit.exe to edit the ImagePath registry value for the appropriate service under the key: \HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services and change the name to the instrumented program. For example, service_app_pure.exe, using the program's full path name. (Note: You might need to be an administrator to change these settings.)
5. It is recommended that you start the Purify user interface before starting the Service to guarantee that the results are displayed there. This is due to the fact that some Services are not allowed to start other programs, or it's used in a remote terminal session, or due to various other security restrictions.
6. Double-click the Services icon in the Control Panel, select the service you want, and then click Startup.
7. In the Service dialog box, select Allow Service to Interact with Desktop. (This way, Purify is visible while you run the service.)
8. Select Manual, and then click OK.
9. In the Services dialog box, click Start. This launches the instrumented service application, which launches Purify, if needed.
Notes:
§ To fix errors in an instrumented service, stop the service before reinstrumenting the new version and then restart the service.
§ Sometimes the increased delay in starting an instrumented service causes the system to shut the service down. One work around is to pre-start Purify while logged on as the system user or administrator.
§ If you start the Purify user interface from a remote terminal session and plan to hook it up with a system service, you should also set the additional environment variable in the SYSTEM environment: PURE_USE_GLOBAL_NAMESPACE=1
§ Sample service code is included with the product. Please refer to the <install_dir>/Samples/NativeService directory.
(C) Copyright IBM Corporation 1992, 2010.