|
Backing up an EXE when it is running as a Service |
These steps enable you to safely backup your Hub
(hub.exe) or any other application (e.g. aserver.exe)
even though the application is running as an NT service.
Do this before
upgrading to a new version of the the application.
- Copy filename.exe to filename-backup.exe. (Use Copy and Paste, NOT Rename, because upon renaming a service's EXE, Microsoft Windows will change the registry in a non-helpful manner.)
|
Stopping the Hub when it is running as a service
|
|
Stopping a Custom WebHub Application when it is running as a service
|
- Go to DOS, and go to the directory containing the EXE.
- At DOS, type
net stop appname
where appname is the name of your program.
For example, net stop aserver
|
Removing an EXE from NT Services
|
The syntax shown below is for The Hub, hub.exe.
For a custom WebHub application,
substitute its filename, e.g. aserver.
- Stop the service.
- Go to DOS, and go to the directory containing hub.exe.
- At DOS, run
hub -remove
That removes the registry entries such that hub.exe is
no longer installed as a service.
|
Upgrading an EXE when it is running as a Service and you want the new version to run in the same directory as the old one |
- Optional: stop your web server software temporarily.
- Stop the program (instructions above).
- Delete the program's EXE file. Note that the program will still be installed, even though you have stopped it and deleted the file.
- Copy the new program file into the same directory location, keeping the same program name.
- Start the program as a service using
net start appname
- Restart your web server software.
|
Upgrading an EXE when it is running as a Service and you want the new version to run from a different directory, e.g. ht\htexe\hub.exe changes to ht\bin\hub.exe |
- Optional: stop your web server software temporarily.
- Stop the program (instructions above).
- Remove the program from services by going to DOS, in the directory containing the program, and typing
appname -remove
For example, to remove the v1.77 Hub:
c:
cd \ht\htexe
net stop "WebHub Central"
hub -remove
- If you haven't already, position the new version of the program wherever you intend to keep it, e.g. WebHub Central Version 2 gets copied to ht\bin\hub.exe.
- Go to the directory containing the program, and install into NT services, e.g.
c:
cd \ht\bin
hub -install
- Start your application, e.g.
c:
cd \ht\bin
net start "WebHub Central"
- Restart your web server software.
|
The key to making all this work easily and smoothly is to
avoid renaming the program while it is installed as a service.
|
Last updated
30-Nov-2006
Pacific Time