KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Accessing 4D server window when ran as a service on Windows
PRODUCT: 4D Server | VERSION: 14.0 | PLATFORM: Win
Published On: August 18, 2014

When running 4D server as a service there isn't a window for the application for the user to interact with. Accessing session zero will allow users to view the 4D server window when ran as a service.

First the server must be registered as a service.

Then the service's properties must be changed in the Services Tool.
Find the name of service in the list, right click the name and select properties to open the properties window.


Go to the "Log On" tab and check the Allow service to interact with desktop setting then click ok. This will allow the window to appear in session zero.


To access session zero open the command prompt as administrator then enter the following commands:

sc config ui0detect start= auto


then
sc start ui0detect


lastly
rundll32 winsta.dll,WinStationRevertFromServicesSession


This will switch the session to session zero and display the 4D server window along with a window that has a button that will return to the login session.


This can help when debugging code ran on the server and needing to interact with the debugger.

Commented by Scott Gelvin on February 11, 2015 at 8:17 AM
Additional info for Window Server 2012 Windows Server 2012 no longer allows interactive services, by default, which makes the Interactive Services Detection service unnecessary. If you must run a legacy application that installs an interactive service on Windows Server 2012, you may sacrifice server stability for compatibility by changing the following registry value from the default of "1" to "0". HKLM\SYSTEM\CurrentControlSet\Control\Windows NoInteractiveServices After doing so and rebooting, the Interactive Services Detection Service will start.