Running Alpha Anywhere as a Service

Description

So here's the challenge. When your system reboots -- possibly after a power failure or (more commonly) because of a Windows security update -- you need the Alpha Application Server to start running again automatically. Any easy way to do this is to put the program in your startup folder.

Discussion

Whenever you log in, Windows looks in your startup folder and runs whatever is there. But what if you haven't logged in? Let's say your machine requires a username and password to log in and you're not around to enter it? What then? This is especially important if you are using a dedicated server or a virtual private server where using a log in is mandatory. The answer is to run the Alpha Anywhere Application Server as a service. Unlike the programs you have listed in the Startup menu, programs that are run as services will automatically load whenever the PC is rebooted.

These instructions apply to Windows 2000* and later. In this document, we're going to...

  1. Install the Alpha Anywhere Application Server.

  2. Install the Windows Server 2003 Resource Kit.

  3. Use the resource kit to create a new service.

  4. Use the registry editor to configure Alpha Anywhere to run as that service.

  5. Test your work.

You will need: (1) A serial number for the Alpha Anywhere Application Server (2) An Internet connection.

 Install the Alpha Anywhere Application Server

If you purchased a license for the Alpha Anywhere Application Server, then the download link to the software should be in the email. Install the Alpha Anywhere Application server. Then once installed, run the program. The Application Server Settings dialog box appears. Make sure you check the box that that says to Automatically start the Server.

The Alpha Anywhere Application Server and Alpha Anywhere Development Environment must have the same build number. If the build numbers do not match, published web applications may fail to run properly.

The build number is always listed on the download page for the Application Server and Development Environment.

To determine the build number from within the Alpha Anywhere Development Environment, open the Help menu and select About Alpha Anywhere.... The build number is listed as part of the Version information.

To determine the build number for the Alpha Anywhere Application Server after it is installed, open the Application Server Settings. The build number will be located at the top of the window next to the server status.

Then click Add License link on the General tab and enter your license number. Once it is entered, click the Activate button to activate it.

 Install the Windows Server 2003 Resource Kit Tools

Download a copy of the Windows Server 2003 Resource Kit Tools from the Microsoft website. The link can be found here: http://www.microsoft.com/Downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en Once downloaded, run the software to install it.

 Copy INSTSRV and SRVANY and then run them in a DOS window

This next step is going to set up a new service. To begin open Windows Explorer by choosing Run from the Windows Start menu. When the Run dialog box appears, type explorer.exe then click OK. On the root of your C drive, create a folder called SRVMKR (short for "service maker".)

When that is created, go to installation path for the Resource Kit you installed. If you chose the default path during installation, then look here: C:\Program Files\Windows Resource Kits\Tools Now we need to find two files that were installed with the resource kit, they are: instsrv.exe and srvany.exe Copy these two programs and paste a copy of them in the SRVMKR folder you created earlier.

From the Windows Start menu choose Run. When the Run box appears, type CMD and click OK.

At the DOS prompt type: CD c:\servmkr\ and press the Enter key. Then type:

instsrv.exe A5ApplicationServer c:\srvmkr\srvany.exe

Enter key. (Note: some of the images that follow may not match the instructions exactly, because they were taken using an older version of Alpha Anywhere.)

You'll get a "The Service was Successfully Added!" message. You can now close the DOS window. Just one more step...

 Edit the registry

Open the registry. From the Windows Start menu, choose Run. Then type REGEDIT and click OK.

When the Registry Editor appears, use the Tree control on the left side to drill down until you come to the following entry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\A5ApplicationServer

Right click on the A5ApplicationServer entry and choose New>Key

Name the new Key Parameters

Right click on the Parameters key and choose New > String Value. And name the new string Application. Now right click on the Application string and choose Modify. The Edit String box appears. In theValue data: box, enter the Path and executable name for the Alpha Anywhere Application Server.

The default for the Alpha Anywhere server on a 64-bit OS is: C:\Program Files (x86)\a5v12 ApplicationServer\A5ApplicationServer.exe (You can copy the path from this document and paste into the Edit String box if you like.)

 Reboot and check

At this point you should be all set. So let's test. The best way to see if everything has been installed correctly is to reboot your PC. When Windows restarts, choose Run from the Windows Start menu. Then type in MSCONFIG and click OK. (Alternatively, for Windows XP and later, right-click on the system toolbar, select Start Task Manager, and view the Services tab in Windows Task Manager.)

When the System Configuration Utility appears, click on the Services tab. You should see A5ApplicationServer, and it should be listed as running.

You've done it! Whenever your PC reboots -- even if you don't log in, the Alpha Anywhere Application Server will run.

Microsoft does not officially support 'srvany' on all operating systems. Use at your own risk on unsupported systems. See http://support.microsoft.com/kb/137890

(c) 2009, 2010 Dave McCormick and Alpha Software. With thanks to Jim Dusoe.