Author Topic: Run HFS as a Windows Service  (Read 42616 times)

0 Members and 1 Guest are viewing this topic.

Offline Guanxi

  • Occasional poster
  • *
  • Posts: 1
    • View Profile
Re: Run HFS as a Windows Service
« Reply #30 on: August 08, 2015, 12:04:20 PM »
Some recent experiences, as of August 2015
HFS runs nicely as a Windows service on my Windows 2012 server. As already discussed at lenghts, I had to convert HFS into a service to keep it running independently of users. The other option discussed, putting it into a startup folder of a separate user and logging in automatically seemed not very elegant to me - and was not possible, because I do not have the authority to add users.

To convert HFS to a Windows service I used the nice hfs2service tool found at the beginning of this thread.
I had to overcome two hurdles, that I want to share:

* The current version of HFS is distributed as "hfs4e.exe"
hfs2service however seems to have hfs.exe hard coded somewhere, which prevents the service from starting.
Renaming hfs4e.exe to hfs.exe gets the conversion working

* I run MS IIS and Tomcat on the same web server as HFS. It was already a surprise to me, that HFS was running without interfering with them with the default (I think 8080) port. However when HFS was automatically started as a Windows service, it  interfered with IIS and Tomcat, that finally none of them have been working anymore. Selecting another port for HFS (I took 9090) resolved the issue.

Final tip on launching the HFS application (e.g. to maintain the directories shared), when it is already running as a service.
When I opend the HFS application, while running it as a service already, it showed "Server is currently OFF" (in the top middle of the page).
Reason is that HFS could not start, because another instance of it aleady used the same internet port.
The interesting thing was, that this status survived even reboot and reinstall of the HFS Windows service.
Thus you have to stop the HFS service using the task manager before using the HFS application.
If you incidentially launch the HFS application while the HFS service is still running, you have to switch on the server on again, e.g. by clicking on the "Server is currently OFF" message