rejetto forum

Run HFS as a SERVICE - info here!

maverick · 27 · 39360

0 Members and 1 Guest are viewing this topic.

Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
There have been many times when users of HFS were asking if HFS can be run as a service.  

I have come across a small utility that will run ANY app as a service.  Here is some info in case you are interested:

DESCRIPTION

AppToService is a Windows NT/2000/XP/2003 Unicode console application that lets you run regular applications and servers as Windows services. This allows you to have some of the benefits of a Windows service, such as the ability to run an application even when no user is logged on the computer, the ability to run an application under a specified user account, the ability to allow an application to survive logoff/logon sequences, hence saving the overhead of re-starting it for each new user, and so on. For instance, you can run a dialer application as a service to automatically connect a computer to the Internet following unattended reboots.


HOW DOES IT WORK?

For each application that you need to run as a service, simply execute AppToService with the appropriate parameters to create a service encapsulating the application. You can manage services created with AppToService using any Windows service manager such as the Services applet or the Net console application from the Command Prompt. When the service is no longer needed, remove it by executing AppToService with the appropriate parameters.

When an AppToService service starts, it opens the client application associated with it. When the service stops, it closes the client application. If the client application closes while the service is running, the service automatically stops.

Code: [Select]
url is deadHFS has been tested running as a windows service on XP SP2 with this small utility and it works PERFECTLY.
« Last Edit: January 14, 2010, 07:26:06 AM by maverick »
maverick



Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile

Anonymous

  • Guest
Quote from: "maverick"
There have been many times when users of HFS were asking if HFS can be run as a service.  The answer, of course, was no it isn't built in yet.

I have come across a small utility that will run ANY app as a service.  HFS has been tested running as a windows service on XP SP2 with this small utility and it works PERFECTLY.

I have been waiting a long time for something like this!  I also tested running HFS as a windows service and it works very good.  No problems at all.

Thanks :)


Anonymous

  • Guest
This is what I did and it doesnot work for me. Any ideas why.

C:\Program Files\HFS>sc create "HFS" binpath= "c:\program files\HFS\hfs.exe"
[SC] CreateService SUCCESS

C:\Program Files\HFS>sc start "HFS"
[SC] StartService FAILED 1053:

The service did not respond to the start or control request in a timely fashion.


mongo

  • Guest
Quote from: "Anonymous"
This is what I did and it doesnot work for me. Any ideas why.

[SC] StartService FAILED 1053:

The service did not respond to the start or control request in a timely fashion.
This thread is about the apptoservice utility.

It appears you are trying to use the microsoft utility.  A quick google search gives you many results regarding the startservice failed response.  Go here for more information and you might find the solution to your problem -> http://www.google.com/search?q=StartService+FAILED+1053&sourceid=opera&num=0&ie=utf-8&oe=utf-8




Offline ants

  • Occasional poster
  • *
    • Posts: 20
    • View Profile
'Guest' how do you open the program in English?

EDIT:

Quote from: "rejetto"
you get a similar utility from microsoft for free
while appToService is not
http://www.rejetto.com/forum/viewtopic.php?t=1389


Once HFS is running as a service how do I open up the program? It says monoLib error: no reply. So for example, how would I add files to the VFS or change settings etc?


Offline ledufe

  • Tireless poster
  • ****
    • Posts: 272
  • LEandro DUpont FErreira
    • View Profile
    • http://ledufe.no-ip.info:2222
Quote from: "ants"
'Guest' how do you open the program in English?

EDIT:

Quote from: "rejetto"
you get a similar utility from microsoft for free
while appToService is not
http://www.rejetto.com/forum/viewtopic.php?t=1389


Once HFS is running as a service how do I open up the program? It says monoLib error: no reply. So for example, how would I add files to the VFS or change settings etc?


well, i took this from original site translated in the google language tools korean to english beta, but i guess it will not work on my windows pt-br

Quote
2004/09/01 13:03 answer writing elimination English version it added. (Execution file again knock-down road it wishes.)  With program with English it puts the file which is ezSVC.ENU in same directory and it comes out. Only, only English (the United States) environment it comes out with English.  If case informing staring which will have the sentence which does not hit to five other or a grammar it will amend and it will give.
<<LeDuFe>>


Offline coollion

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
Do this at your own risk! Registry manipulation can cause problems!
If you do not know what I am talking about do not do this procedure!

For me this works great under XP Pro.

Get the srvany.exe and instsrv.exe from the windows 2003 resource cd or from www.techeez.com/windows_tips/service_under_nt.htm

I have the application running in folder:
C:\NonInstalledProgramFiles\HTTPFileServer\hfs.exe
If you have it in an other folder than change the folder in the reg file.

Step 1) copy the instsrv.exe and srvany.exe to c:\windows\system32\
then run the below command in the c:\windows\system32 folder

Step 2) Make a reg file from the info below between the two lines.

Step 3) Edit the reg file and change the folder path C:\NonInstalledProgramFiles\HTTPFileServer\    to your own folder path. do not forget the double slashes!!

Step 4) In Start>RUN copy the following line and run it.
instsrv HFS %SystemRoot%\System32\srvany.exe

Step 5) then insert the reg file by running it.

Step 6) change the user that runs the service to adminstator ( including password )

Step 7) reboot

Registor File looks like this.
Copy textbetween the two lines in a text file and save the text file with .reg as extension.
------------------------------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HFS]
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):43,00,3a,00,5c,00,57,00,49,00,4e,00,44,00,4f,00,57,00,53,00,\
  5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,72,00,76,\
  00,61,00,6e,00,79,00,2e,00,65,00,78,00,65,00,00,00
"DisplayName"="HFS"
"ObjectName"="Administrator@Globalisl.local"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HFS\Parameters]
"Application"="C:\\NonInstalledProgramFiles\\HTTPFileServer\\hfs.exe"
"AppDirectory"="C:\\NonInstalledProgramFiles\\HTTPFileServer\\"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HFS\Security]
"Security"=hex:01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,\
  00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
  00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
  05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
  20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,\
  00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,\
  00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HFS\Enum]
"0"="Root\\LEGACY_HFS\\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001
---------------------------------------------------------------------

Success.


Offline give2me

  • Occasional poster
  • *
    • Posts: 26
    • View Profile
download my detailed info file here :
http://home.planet.nl/~feike052/Createyourownuser-definedservices.zip

instructions in that zipfile works for all programs that you would like to start as a service

read the included "Create your own user-defined services.rtf"
it has detailed screenshots of what should be on the screen while configuring !

suc6 en greetings from the DUTCH  ;)


Mark

  • Guest
Someone asked this earlier but I didn't see an answer :

When running HFS as service via your choosen run program as service freeware how do you alter the configuration of HFS being used by the service ?

I guess you :

1) stop the service (if started) that runs HFS
2) run HFS executable to get normal GUI
3) alter settings
4) save and exit HFS
5) start the service that runs HFS

Is this correct ?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i guess that's the way
but consider several things could be done via command line with HFS
not very handy, but doesn't require a restart


Offline give2me

  • Occasional poster
  • *
    • Posts: 26
    • View Profile
if you look just a little above , you see my link with the tools to create a service.
After that you can configure hfs just normally , because the HFS icon is just where it's normally at..
So ... whith a gui
Succes  ;)