Edit:
Official solution for running Distributed Render and Licensing servers as Windows services using this method is here:
https://coronarenderer.freshdesk.com/support/solutions/articles/12000007896-----
Original post:
A short guide how to run drServer as windows service, I can´t live without it. Use it at your own risk, it´s not officially supported and I´m not part of the developer team. Here we go:
INSTALLATION- No max or drServer instance should be running on the node before proceeding
- Install drServer as usual with the help of the standard installer if not yet done
- Get the "Non-Sucking Service Manager" here: http://www.nssm.cc/
- Extract and copy the appropriate executable (win32/win64) of nssm.exe to your windows directory
- Run a shell as administrator: Navigate to windows\system32, find "cmd.exe", right-click and select "Run as administrator"
- Type "nssm install CoronaDrServer" into the shell and press return
- The "NSSM serivce installer" window pops up.
- In the "Application" tab click the button following the "Path" input field
- Navigate to "Program Files\Corona\Corona Renderer for 3ds Max\DR Server" and select "DrServer.exe"
- Press "Install service"
- A window saying "Service 'CoronaDrServer' installed successfully!" should pop up, press "Ok"
drServer is now installed as a service on the node, using the local system account as the "user". This was the easy part. Now the license has to be activated - even if you have already done that on the node because it´s a per user license and the service is running as another user (system).
RUNNINGAs every other service: right click on the "Computer" icon on the desktop -> "Manage" -> "Services and Applications" -> "Services". There should be the entry "CoronaDrServer" now. It is configured to start automatically by default (at boot time). Doubleclick on the entry and press "Start". The service is now running.
ACTIVATIONOption A (recommended):
Use the Corona license server on a node somewhere in your network. As a result the node will activate its license automatically when a render job starts. The LicensingServer.exe can also be run as a service by the way, similar to drServer.
Option B:
Activate as described here:
https://coronarenderer.freshdesk.com/support/solutions/articles/5000564325-activating-license with the important exception that you have to navigate to "\windows\system32\config\systemprofile\AppData\Local\CoronaRenderer" instead. This is the %LOCALAPPDATA%/CoronaRenderer/" directory of the local system account. Remember that you have to start a rendering via dr on the node with the service running before following those instructions, there has to be a "request.txt" or "request-3dsmax.txt" file in that directory which is generated at the first use.
DEINSTALLATION- Run a shell as administrator: Navigate to windows\system32, find "cmd.exe", right-click and select "Run as administrator"
- Type "nssm remove CoronaDrServer"
- Confirm removal
If you have any issues concerning distributed rendering using this setup: please remove or stop the service, run drServer.exe conventionally and try again before reporting anything that goes wrong to assure this setup is not the cause (I do that every time but until now there were no problems related to this).
Maybe there will be a supported way to run drServer as service in the future, but this setup works fine for me in the meantime.
Good Luck!
P.S.: Remember to always use UNC paths for your assets and that network shares used for assets have at least read access for "everyone".
Edit: Removed note about errors of older license server - obsolete now
Edit: Adjusted paths for newer versions at 9.)
Edit: Adjusted paths for v5 build 19-09-30 and later at 9.)