David,
running the Omnis App Server as as Windows service is really working very well.
Put your library in the Omnis Startup folder and that’s it. Maybe you have to adapt the code to this a little or you just put a loader library in the startup folder, that is loading the main library in it’s usual environment.
The default ntserv.ini file looks like this:
[Service]
Name=OMNISServerx64
DisplayName=OMNIS Server x64
Description=Omnis Web App Server x64
Program=OMNIS.EXE
StartType=2
The Name entry determines the internal name of the service and you can give it the name of your application. But it shouldn’t contain any spaces, special character etc. Also it should be in lower case.
It is used i.e. for starting/stopping the service via command line:
net start myservice
The display name is what appears in the Windows Service panel and may be your application’s full name with spaces, upper and lower case etc. But as short as possible.
The description also appears in the Service panel and may contain some more words but not too many.
The Program entry should not be changed as long as you don’t rename omnis.exe (and the depending DLLs)
StartType means, if the service is startet manually, automatically (2) or if it is deactivated.
What is really important, is the User Account the service is running under. The account must have the “Run as Service” user pivilege AND should have all necessary rights for executing the particular tasks of your application.
Running the service at administrator level is not a good idea and may do real harm if your library may contain some bugs (= destructive code). Usually in business environments, a specific service account will be created that is given all the rights to resources as file shares, databases, network access etc. that is effectively needed.
Cheers
Klaus