Applies To:
  • CitectSCADA 5.xx, 6.00

By executing one command from Citect, I want to shut down Citect, then log off from Windows, Log on automatically and then run Citect on start-up.  

The following steps explain how this can be achieved.

1. Setting Auto Log On

You will need to edit the registry using Regedt32.exe:


Add the values:

AutoAdminLogon: REG_SZ:1
DefaultDomainName: REG_SZ:YourComputerName
DefaultPassword: REG_SZ:YourPassword
DefaultUserName: REG_SZ:YourUserName
ForceAutoLogon: REG_SZ:1

You can refer to Q3601 and Q2006 for more details on setting up auto log on.

2. Running Citect on User Log On

In order to achieve the above, you will need to set up a schedule from windows to run citect on start up. Go to the control panel and open the Scheduled Tasks. Run the Schedule Task Wizard and add the Citect Run Time Application from the application list as a new schedule to be performed on User logging On.

3. Shutting Down Citect

You will need to call the Citect ShutDown Cicode function using mode 3. Calling this function will shutdown Citect and logs the user off from windows.

* Steps 2 and 3 need to be done only once.
* The Cicode function ProjectSet may need to be called before the ShutDown Cicode function as described in step 3. This sets either the name or the path of the project to be run next time CitectSCADA is re-started. The project path is written to the [CtEdit]Run parameter. 

shutdown, Log off, Re-start