Applies To:
  • CitectSCADA 4.xx 5.xx

Summary:
I would like Citect to run independently of the Program Manager when operating on Windows NT. This would mean that even if a user logged out of the operating system, Citect would continue to run. How can I do this? 

Solution:

It is possible to set up a service which runs Citect automatically, as soon as the operating system gets under way. To do this, you will need an .exe which Microsoft distributes on it's Windows NT Resource Kit CD. The file is called SRVANY.EXE and is copied to the Resource Kit directory when you install the RK. To install the service for NT, copy the file into the Windows system directory and then use the following command -

INSTSRV Citect C:\WINNT\SYSTEM\SRVANY.EXE

The service name (shown here as 'Citect') can be arbitrary. Running this program will cause the 'Citect' service to be added to the list of Windows services.

Next, run the Registry Editor (REGEDT32.EXE). Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Citect create a new key called 'Parameters'. Under the above key, add a new value of type REG_SZ (string) with name 'Application' and specify the full path of your app executable (including the extension). For example:

Application: REG_SZ: C:\Citect\Bin\Citect32.exe

As an option, under also add another value of type REG_SZ called 'AppParameters' and specify the parameters for your app. For Example:

AppParameters: REG_SZ: /ic:\windows\ctv410r0.ini

A further option under the above key is to create a value of type REG_SZ called 'AppDirectory' and specify the current directory to use for the app, eg:

AppDirectory: REG_SZ: C:\Citect\Bin

Much of this information is taken from the document which accompanies SRVANY.EXE (SRVANY.WRI) Further information can be found in this document.

Next you need to add the following parameter to your CITECT.INI file:

[Kernel]
WinShutdown=1

This parameter will allow you to log on and off a Windows NT while Citect is still running as a service. If you don't set this parameter, when the user tries to log off from Windows NT, Citect will prevent NT from allowing the user to log off, as Citect thinks the user is trying to shut the computer down.

Lastly, start the Services applet in the Windows Control Panel and select the Citect service and click on Startup to get the properties. You can select here to either use the default System account for user rights or to use a specific user account. If you want users to be able to see graphics pages after logging in, then you must select "Allow Service to Interract with Desktop". Next you can select the startup mode and manually start and stop the service to test it.


Keywords:
 

Attachments