Script Service Script service modes
The Script Service supports two modes herein called service and application mode:

Service mode is more useful but it is appropriate for Windows NT/2000 systems. Script Service is registered as system service and can be started from the control panel.

Application mode is supported mostly for development convenience and to allow usage on Windows 98 and some applications of personal interest to the developer (maintenance of the machine for example). It is not recommended to use it in this mode with IIS!

By default the setup will register the exe in Application mode. To reconfigure it to run as service open a command prompt window and type:

<path>\scpsvc.exe /Service
or go to its directory and type just:
scpsvc.exe /Service

If you need to unregister it type scpsvc.exe /UnregServer (this is for both modes). If you have registered it as service and you want to reregister it in application mode - unregister it and then type scpsvc.exe /RegServer. Note that you may need to restart the machine when unregistering from service mode! If the error occurs (service marked for deletion) restart the machine to allow the service manager to update its db.

IIS notes: If you have it in application mode any request to the Script Service from IIS will start it in the IIS context. Therefore if you have one copy started manually a second copy will be started. The pages running under IIS will refer its copy, the applications working on your desktop (for example ASP pages executed with ALP) will refer to the copy running on your desktop. This effect could be useful sometimes, but in most cases it could be a source for mistakes. In service mode only one copy will be started and both desktop and IIS applications will refer to it (this seems to be desired in most cases).

If you need more convenience application mode will offer you some additional opportunities. It could be very convenient if you are developing some ASP pages with ALP. But moving them to IIS could be cause confusions (you will have two separate copies running probably executing different versions of the script). Thus we strongly recommend if you are developing on the same machine that runs your public WEB server to install Script Service in service mode in order to avoid confusions.

Also running in application mode means the service will not start automatically when the system starts, while in service mode it will start during the OS startup process and any scheduled tasks implemented/handled by the script will have chance to run.

Script errors:

The script you are writing for the Script Service may cause errors as any other script. They are reported in the ReportFile and also (if not disabled) in the application event log. In application mode the last message or error is displayed in the application window. If you receive errors without any additional information - check if the script file is specified correctly.


newObjects Copyright 2001-2006 newObjects [ ]