Services are programs that are automatically started up as Windows NT boots, they do not wait for someone to log on.
For examples of existing services on your PC, open the Control Panel, and then open the "Services" icon (there is an example below).
When you first install PennMUSH as a service it is marked as "automatic start" which means that it will start up automatically every time you boot the PC. However, you can use the "Services" Control Panel to make the startup manual, and then only start it when desired.
Example of the services control panel.
If you get an error message "Access is denied" when attempting to install the service, you will need to either:
pennmush /run
pennmush /install
You should get the message "Service successfully installed"
pennmush /start
You should get the message "Start request sent to service"
You only need to start the service manually:
To start the service manually type (at a DOS prompt):
pennmush /start
You should get the message "Start request sent to service"
If you want to always start the service manually:
You can stop the service (i.e. the MUSH) by:
pennmush /stop
You can pause the service (I'm not sure how useful this is) by clicking on "Pause" in the "Services" Control Panel when you have "PennMUSH" highlighted. To resume it, click on "Continue".
A paused service is halted, but will resume when you click on Continue. You might do this to see what effect the MUSH has on the rest of your PC by pausing it briefly and seeing if that has any effect on other programs.
To permanently de-install the service, start a DOS window (Command Prompt), change to the MUSH directory, and type:
pennmush /remove
Note that you cannot remove the service while it is running. You will have to shut the MUSH down first (ie. type: pennmush /stop).
To find if the MUSH service is running or not, type:
pennmush /status
The output from the game (initial information, connects etc.) are written to the file LOG\GAME.LOG if the MUSH is running as a service. You can use NotePad or another word processor to inspect this file at any time. This might be useful if the MUSH has crashed or not start up correctly.
At a DOS prompt, type:
pennmush /help
You should see the following display:
Usage is :-
PennMUSH - runs as a service, or stand-alone
PennMUSH /run - runs stand-alone
PennMUSH /start - starts this service
PennMUSH /stop - stops this service
PennMUSH /install - installs this service
PennMUSH /remove - removes (un-installs) this service
PennMUSH /status - displays the status of this service
PennMUSH /help - displays this information
Note that you cannot run the MUSH as a service under Windows 95. This operating system does not support services, and does not have a "Services" item in the Control Panel.
You can only install the MUSH as a service under Windows NT or Windows NT Server.
Experience has shown that you cannot successfully install the MUSH as a service from a network drive. You must install from a local drive. e.g. C:\MUSH , not N:\MUSH
If you move or rename the directory containing the MUSH you will have to remove the service and reinstall it. This is because the full pathname to PENNMUSH.EXE is stored by the system at installation time.
Somewhat to my surprise, it seems that shutting down Windows NT does not automatically send a "stop" message to all running services. In order to work around this (so that the database is saved) I have put code in to detect a shutdown. However, for safety's sake, you may wish to do one of the following prior to shutting down your PC:
pennmush /stop
(and double-click on that shortcut before shutting down the system).
Having done one of the above, wait a few seconds (or minutes if you have a huge database), before shutting down the PC itself.
If there is no activity on the MUSH then it might not detect the "stop" command. To fix this, log on using Telnet or your client program. If you have issued a "stop" command then this will cause the MUSH to close down immediately.
Comments to Gammon Software support
Page updated on Wednesday, 15 December 2004