rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: maverick on September 14, 2005, 07:42:39 AM

Title: Run HFS as a SERVICE - info here!
Post by: maverick on September 14, 2005, 07:42:39 AM
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.
Title: Run HFS as a SERVICE - info here!
Post by: kamzata on September 15, 2005, 08:04:53 AM
Tnks! :)
Title: Run HFS as a SERVICE - info here!
Post by: rejetto on September 18, 2005, 09:11:57 AM
you get a similar utility from microsoft for free
while appToService is not
http://www.rejetto.com/forum/viewtopic.php?t=1389
Title: Re: Run HFS as a SERVICE - info here!
Post by: Anonymous on September 19, 2005, 12:43:32 AM
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 :)
Title: Run HFS as a SERVICE - info here!
Post by: Anonymous on April 01, 2006, 10:55:57 PM
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.
Title: Run HFS as a SERVICE - info here!
Post by: mongo on April 02, 2006, 06:22:46 AM
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
Title: Re: Run HFS as a SERVICE - info here! --> ezSVC
Post by: Anonymous on June 22, 2006, 04:07:40 PM
Here is "ezSvc" that lets you run regular applications as Windows services.

-Freeware

http://isulnara.com/myAPP/ezSVC/ezSVC.exe
http://isulnara.com/myAPP/ezSVC/ezSVC.ENU
Title: Re: Run HFS as a SERVICE - info here! --> ezSVC
Post by: Anonymous on June 22, 2006, 04:11:50 PM
Here is some screenshot.

(http://isulnara.com/bbs/data/myAPP/ezSVC_ENU.gif)
http://isulnara.com/tt_new/entry/%EC%9D%BC%EB%B0%98-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8%EC%9D%84-NT-%EC%84%9C%EB%B9%84%EC%8A%A4%EB%A1%9C-%EC%8B%A4%ED%96%89-ezSVC
Title: Run HFS as a SERVICE - info here!
Post by: ants on June 23, 2006, 01:49:40 AM
'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?
Title: Run HFS as a SERVICE - info here!
Post by: ledufe on July 02, 2006, 10:32:50 PM
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.
Title: Using srvany.exe and instsrv.exe to run HFS as a service
Post by: coollion on July 31, 2006, 02:14:52 PM
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.
Title: Run HFS as a SERVICE - info here!
Post by: give2me on August 08, 2006, 03:03:16 PM
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  ;)
Title: Re: Run HFS as a SERVICE - info here!
Post by: Mark on June 27, 2007, 12:09:51 PM
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 ?
Title: Re: Run HFS as a SERVICE - info here!
Post by: rejetto on June 27, 2007, 12:49:28 PM
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
Title: Re: Run HFS as a SERVICE - info here!
Post by: give2me on June 27, 2007, 03:25:36 PM
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  ;)
Title: Re: Run HFS as a SERVICE - info here!
Post by: PikachuEXE on June 28, 2007, 10:41:21 AM
I think the packaging(install, service, start up...etc) should be worked at the end

the function is more important
Title: Re: Run HFS as a SERVICE - info here!
Post by: fabnos on June 28, 2007, 11:48:14 AM
I use this tool: Any2service    
but I've seen that any links to this sw is now broken or don't exist.
If any have necessity of this program, I can furnish it also if,
for first thing, I must see where I have archived this file  ???

Best regards

Title: Re: Run HFS as a SERVICE - info here!
Post by: Service tool !! on August 08, 2007, 06:41:09 AM
Hi all.

There is one more possibility to run programs as a service in ms environment.

Firedaemon works very fine indeed and has lots of tweak options.

*¨HFS¨*   rocks!!
Title: Re: Run HFS as a SERVICE - info here!
Post by: ELEVENNNN on October 21, 2007, 11:00:08 PM
Giving it a shot on my spare Sabayon box, can never learn enough.  In case anyone wonders why im posting so much I just became active again.
Title: Re: Run HFS as a SERVICE - info here!
Post by: Chamac'h on December 17, 2008, 04:06:23 PM
None of the solutions above worked for me (Windows 2003)...

So, I just wrote the little script below and created a scheduled task which launch the script every hour :
Code: [Select]
for /F %%i IN (' tasklist /FI "IMAGENAME eq hfs.exe" /NH ') DO if %%i NEQ hfs.exe start %~dp0hfs.exeIf you don't understand the script, it just check if hfs.exe is running and starts it if it does not.

If you still don't understand the script, have a look on the windows help file for the for command.  ;)
Title: Re: Run HFS as a SERVICE - info here!
Post by: Sjcs on December 26, 2008, 03:06:45 AM
When using the instsrv.exe and srvany.exe method, to be able to have a gui go to the services panel (start->run->services.msc), find the HFS service you created, right click and select properties, go the the logon tab and tick "Allow service to interact with desktop". Apply, then restart the service and you should have a gui.
Title: Re: Run HFS as a SERVICE - info here!
Post by: MarkV on December 26, 2008, 05:49:27 PM
When using the instsrv.exe and srvany.exe method, to be able to have a gui go to the services panel (start->run->services.msc), find the HFS service you created, right click and select properties, go the the logon tab and tick "Allow service to interact with desktop". Apply, then restart the service and you should have a gui.
Doesn't work anymore in Vista AFAIK.
Title: Re: Run HFS as a SERVICE - info here!
Post by: Z on December 28, 2008, 09:51:07 PM
Does this mean that even if my computer is switched off, will the httpfileserver site still be available?
Title: Re: Run HFS as a SERVICE - info here!
Post by: Mars on December 28, 2008, 09:57:34 PM

Does this mean that even if my computer is switched off, will the httpfileserver site still be available?
Yes in the same way as when you press on the switch to switch off the light, then the bulb continues to shine :D :D

It is necessary all the same to be a little bit realistic before asking certain questions. :-[

We would almost imagine to be back to the nursery school
 ;D ;D ;D ;D ;D
Title: Re: Run HFS as a SERVICE - info here!
Post by: MarkV on December 29, 2008, 06:41:11 AM
Does this mean that even if my computer is switched off, will the httpfileserver site still be available?
No. Of course the computer and HFS have to be running to serve anything.
Title: Re: Run HFS as a SERVICE - info here!
Post by: rejetto on December 30, 2008, 02:10:32 AM
It is necessary all the same to be a little bit realistic before asking certain questions. :-[

that question is made every 8 months. It's because many people are used to online web services, which are always online.
Title: Re: Run HFS as a SERVICE - info here!
Post by: MarkV on December 30, 2008, 08:53:26 PM
It is necessary all the same to be a little bit realistic before asking certain questions. :-[

that question is made every 8 months. It's because many people are used to online web services, which are always online.
Yeah, because the servers run 24/7. Most people don't realize this. There's no magic behind the internet, just a lot of technical masterpieces (like the Cisco backbones, for example).