Run FactorySQL as Application (as opposed to a service)

FactorySQL normally runs as a service, under the system account. This is normally the desired case- services start when windows starts, even if nobody is logged in. However, for various reasons it can be necessary or useful for testing to run as an application.

To run as an application:

  1. Open regedit (Start->run->“regedit” without quotes).
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Inductive Automation\FactorySQL
  3. Change RunAsAppEnabled to 1 and RunAsService to 0.
  4. Go to Control Panel->Administrative Tools->Services and stop FactorySQL.
  5. Right click the FactorySQL tray application and select “close”.
  6. Restart the tray application from the start menu.

To be clear: The tray application normally just monitors the service. After making these changes, however, it will now become the FactorySQL runtime.

Also note: After setting “RunAsAppEnabled” to 1, you will now see options for running as an application or service in the FactorySQL frontend under Settings->Service Settings. Therefore, you don’t need to edit the registry in the future in order to switch back and forth.