Microsoft KB Archive/193238

= How To Run Automation Manager as a Windows NT Service =

Article ID: 193238

Article Last Modified on 7/13/2004

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 4.0 Enterprise Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Windows NT Server 4.0 Standard Edition
 * Microsoft Windows NT Workstation 4.0 Developer Edition

-



This article was previously published under Q193238



SUMMARY
The Windows NT Resource Kit provides two utilities, Srvany.exe and Instsrv.exe, that allow for the creation of a user-defined service. This article describes how to use these two utilities to set up the Automation Manager (Autmgr32.exe) as an Windows NT service.

NOTE: The Microsoft Windows NT 4.0 Resource Kit documents Srvany.exe as an unsupported tool. Use this tool at your own risk.



MORE INFORMATION
WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk.

The following steps will allow for the creation of a user-defined Windows NT service:

Step-by-Step Example
 Copy SRVANY.EXE and INSTSRV.EXE to your Windows\System32 directory. Select a name for your service, AutoMan for instance, and install it as a new service by typing the following at an MS-DOS prompt:

INSTSRV AutoMan C:\windows\system32\SRVANY.EXE (Modify path as necessary)

If the new service is created successfully, the following should be received:

The service was successfully added!

Make sure that you go into the Control Panel and use

the Services applet to change the Account Name and

Password that this newly installed service will use

for its Security Context.

 On the taskbar, click the Start button, point to Settings and click Control Panel. In the Control Panel, double-click the Services icon. Select AutoMan from the lists of services, and click Startup. If you want your service to start every time you boot your machine, select Automatic for Startup Type in the Service dialog box. Otherwise, select Manual or Disabled. If you select Manual, you will need to go into the Services utility, select the service, and click the Start or Stop button every time you want to start or stop the service. In the Log On As area, click System Account, select "Allow Service to Interact with Desktop," and then click Ok.</li> Click Close to close the Services control panel.</li> On the taskbar, click the Start button, and then click run.</li> In the Run dialog box, enter "Regedit" (without the quotes) and click OK.</li> Expand the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AutoMan</li> Select the AutoMan key, and from the Edit menu, point to New, and click Key.</li> Set the name of the new key to "Parameters" (without the quotes).</li> Select the Parameters key, and from the Edit menu, point to New, and click the String Value. Set the name to "Application" (without the quotes).</li>  On the Edit menu, click Modify. Change the Value data to the path to Autmgr32.exe and click Ok. For example:

c:\winnt\system32\autmgr32.exe

NOTE: To run the Automation Manager invisible, add another string value under the Parameters key with the following information: <pre class="fixed_text">     Name             Data AppParameters   /hidden

</li> On the Registry menu, click Exit. If you selected Automatic for Startup Type in step 6, the Automation Manager should start automatically when the machine reboots. Otherwise, open the Services utility from the Control Panel and start the service manually.</li></ol>

<div class="references_section">