Web Connection can be started automatically on system startup, but it cannot run as a service since it is acutally a component that is called from IIS. There are a several ways to configure Web Connection run on startup.
When auto-starting Windows and running without a Console logon the Web Connection Console is not visible - it'll run invisibly in the background and you can effectively turn off the user display (Showserverform=Off/Showstatus=Off). You also will need to configure the DCOM impersonation to NOT use the Interactive User account which can only run with a Console logon.
If you're running Web Connection under COM you can specify the impersonation of the COM server. This allows you specify exactly which account Web Connection runs under and this account can be any account that has rights to access the resources the application requires: Files, databases, network shares etc. You can use any Windows account, but do not use the Interactive User which is the default.
For more information on COM Impersonation Configuration see Manual Com Server Configuration.
To set up your EXE server to autostart set up wc.ini as follows:
ExeFile=c:\wwapps\wc2\wcdemo.exe FileStartInstances=2
This will launch two instances of the specified EXE file from within the Web Server's context hence these instances will be started invisibly and won't show on up on the desktop. Because the launched instances are standalone EXE files the instances will not be automatically removed when the application or the Web Server shuts down. Nor will new instances start up when one instance hangs or crashes - it's up to you to monitor and manage these servers. You can use the Administration page to see which servers are running.
For reliability in deployed applications we recommend you do not use file based operation. COM operation provides auto-startup and shutdown as well as crash recovery ensuring that your servers are always up and running.
For more information on File mode configuration please see Manual File Server Configuration.
However, some folks prefer to run in a visual setting and you can do this by running your servers in an interactive Windows Session.
COM Mode
In COM mode to get the server to run on the desktop the COM server has to be configured for the Interactive User in the DCOM configuration. Only the Interactive User setting in the DCOM Impersonation allows a visible Web Connection server console. In order for the server to work the Windows machine MUST BE logged on to the Console. If there is no log on, or the machine is locked the COM Server will fail to load. This approach is not recommended for deployed applications!
File Mode
File mode has no way to launch instances on the desktop via FileStartInstances mentioned in the previous section - these instances are always loaded in an invisible Windows session. This means you are responsible for loading file based instances - probably from an auto-start program group in Windows.
Web Connection provides a utility in the via the Web Connection menu under Tools to create an AutoLogon entry in the registry for you or you can use the Management Console with the following code:
DO Console WITH "AUTOLOGON"
To manually configure this option in the registry set the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
AutoAdminLogon REG_SZ 1 - AutoLogon 0 - Manual Logon DefaultPassword REG_SZ The accout password DefaultUsername REG_SZ The account name
Com Mode Startup Problems on busy Sites
In auto-logon mode with COM, IIS starts much earlier than the Console and so you will likely get errors during the startup phase of the machine when IIS is trying to start the COM servers while the Console is not up yet.
Again, we don't recommend this approach as it is volatile and can result in servers not starting up properly especially in COM mode.