Microsoft KB Archive/143431

{| The information in this article applies to:
 * width="100%"|
 * Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0

SUMMARY
The Windows NT Resource Kit provides two utilities that allow you to create a Windows NT user-defined service for an application (executable) or batch file. This article describes how to use these two utilities, SRVANY.EXE and INSTSRV.EXE, to set up the Automation Manager as a Windows NT service. In this article you will be instructed to use the Registry Editor, REGEDT32.EXE. Before doing so, please read the following:

WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows NT 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.

MORE INFORMATION
When using the Registry Editor, you will be instructed to add a key or add a value to the Registry. To add a key, select Edit from the Registry Editor menu and choose Add Key. Similarly, to add a value, select Edit and then choose Add Value. Making any of the above selections will result in a prompt for further data. Please follow the steps below for the correct setting.

To set Automation Manager as a Windows NT service, do the following step-by-step instructions:

 Copy SRVANY.EXE and INSTSRV.EXE to your system32 directory.  Select a name for your service, AutoMan for instance, and install it as a new service by typing the following at the command line: INSTSRV AutoMan C:\windows\system32\SRVANY.EXE   If new service is created successfully, you should get the following: CreateService SUCCESS Don't forget!!! You must now go to the Control Panel and use the Services utility to change the account name and password that this newly installed service will use when it attempts to logon as a service when it starts. Also, use the Services utility to ensure this newly installed service starts automatically, since the point of this service is to start automatically and apply the DACLs to the floppy drives prior to a user logging on at the keyboard  Now go to the Control Panel and open the Services utility. Select your new service, in this case AutoMan, and click the Startup button. 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. Select System Account for Log On As, and make sure to check the Allow Service to Interact with Desktop option. Click OK and Close the Services utility.</li> Run REGEDT32.</li> Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AutoMan, add a new key and set its name to "Parameters" (without quotes). Notice that AutoMan is only the service name in this case. You may have chosen a different name.</li> Under Parameters, add a new value. Set Value Name to "Application" and leave the default REG_SZ for Data Type. When prompted for the value's string, set it to reflect the path and filename of the Automation Manager, for example C:\windows\system32\AUTMGR32.EXE.</li> If you intend to run the Automation Manager invisible, add another value under the Parameters key and set its name to "AppParameters". Leave the default REG_SZ for Data Type, and set the String to "/hidden".</li> Now Exit RegEdt32 and restart your machine. If you selected Automatic for Startup Type in step 6, the Automation Manager should start automatically. Otherwise, open the Services utility from the Control Panel and start the service manually. If you chose to run Automation Manager hidden, you can verify that it is running by using PView.</li></ol>