rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: ledufe on October 04, 2006, 06:30:59 AM

Title: NewSoftware HFS2Service
Post by: ledufe on October 04, 2006, 06:30:59 AM
well, here is another try to help our comunity

this experimental app create a windows service to run hfs...

http://ledufe.no-ip.info:2222/HFS-TOOLS/hfs2Service/COMPLETE/hfs2Service-binarie.rar (http://ledufe.no-ip.info:2222/HFS-TOOLS/hfs2Service/COMPLETE/hfs2Service-binarie.rar)

and the sources

http://ledufe.no-ip.info:2222/HFS-TOOLS/hfs2Service/COMPLETE/hfs2Service-sources.rar (http://ledufe.no-ip.info:2222/HFS-TOOLS/hfs2Service/COMPLETE/hfs2Service-sources.rar)

hope you like it

and here a little explain:

put the "hfs2Service.exe" in the same folder of the hfs, or in some folder that you do not pretend to move or rename, im

saying this because the "hfs2Service.exe" will deploy a executable in the folder that you execute it, so when you configurate

the right path to the hfs, set the preferencies for the service, create the service, and start it, you can´t delete or remove

the folder or the "HFS-Service.exe"
it will be "bound" directly with the service, and until you stop and delete the service, you can´t do these functions

now lets explain something to make it more easy to use(???)

now lets try it:

(http://img172.imageshack.us/img172/3377/01hfs2service

gg6.th.gif) (http://img172.imageshack.us/my.php?image=01hfs2servicegg6.gif)
1 - this is the folder where the hfs.exe and the hfs2service are: observe that there are only 2 files

(http://img154.imageshack.us/img154/7580/02hfs2service

ph2.th.gif) (http://img154.imageshack.us/my.php?image=02hfs2serviceph2.gif)
2- when you open the hfs2service.exe it will deploy on the same folder more 2 files that are responsable to monitoring the

service, the main hfs-service engine "HFS-Service.exe"  and a template script of the commands inside the "HFS-Service.ini".   

NOTE the Status saying "SERVICE NOT INSTALLED" in red.

(http://img105.imageshack.us/img105/548/03hfs2servicev

c5.th.gif) (http://img105.imageshack.us/my.php?image=03hfs2servicevc5.gif)
3- note that the service name it will be always "HFS-Service" so, you only have to inform the right path to the Rejetto hfs

executable, if you run the hfs2service.exe on the same folder of the hfs.exe you can skip this step

(http://img105.imageshack.us/img105/4116/04hfs2service

fh5.th.gif) (http://img105.imageshack.us/my.php?image=04hfs2servicefh5.gif)
4- here we will set-up the number of seconds that the hfs service will monitore if the hfs.exe is running ("Time Between

Checks) the default is 1 second, but i sugest 30 or 60 seconds, and there is also a option to set the time that the

hfs-service will delay the opened of the hfs.exe(i know that someone will ask for this)

(http://img480.imageshack.us/img480/3981/05hfs2service

xx0.th.gif) (http://img480.imageshack.us/my.php?image=05hfs2servicexx0.gif)
5- one of the most important option is to set-up the hfs-service to start the hfs in case of the hfs crash or if you or

someone/some software close the hfs, check this box if you want it.

(http://img468.imageshack.us/img468/1764/06hfs2service

ma5.th.gif) (http://img468.imageshack.us/my.php?image=06hfs2servicema5.gif)
6- since all the setting are done, well just hit the button "CREATE", and the "hfs2service" will show how the script was

modified and will execute the command to install the HFS-SERVICE

(http://img92.imageshack.us/img92/9670/07hfs2serviceyi7

.th.gif) (http://img92.imageshack.us/my.php?image=07hfs2serviceyi7.gif)
7- NOTE the Status changed to "STOPED", if you reboot, the service will auto-start.

(http://img92.imageshack.us/img92/4076/08hfs2servicecl9

.th.gif) (http://img92.imageshack.us/my.php?image=08hfs2servicecl9.gif)
8- ...or if you want to start the service before you reboot just to test, hit the "START" buttom and you will see the Status

changed to "RUNNING" and after the defined period of time, it will auto-start the hfs

(http://img209.imageshack.us/img209/5853/09hfs2service

xi5.th.gif) (http://img209.imageshack.us/my.php?image=09hfs2servicexi5.gif)
9- Note that after you install and start the service, you will have another file created on the same folder of the

hfs2service.exe, you got a "HFS-Service.log, if something goes wrong it will inform to you

(http://img244.imageshack.us/img244/7760/10hfs2service

th0.th.gif) (http://img244.imageshack.us/my.php?image=10hfs2serviceth0.gif)
FIXED: - now the remove of the service is ok, and no more errors if the service was installed and you re-open the hfs2service
- the browse function to search, now only search for a exe named "hfs.exe"

10- if you have closed the hfs2service.exe and open it again, you will see this message, "the process cannot access the file

"PATH\HFS-Service.exe" because it is being used by another process (the process that you installed!!!), just don´t mind it,

it will open right after the error message.FIXED!!!

(http://img505.imageshack.us/img505/2663/11hfs2service

cz0.th.gif) (http://img505.imageshack.us/my.php?image=11hfs2servicecz0.gif)
11- the hfs2service will inform you on the status if the service are stoped, running, and here you can start, re-start, stop

the service, but to remove the service, you "MUST" Stop the service before Remove it

(http://img147.imageshack.us/img147/6919/12hfs2service

wx0.th.gif) (http://img147.imageshack.us/my.php?image=12hfs2servicewx0.gif)
12- and if you got some troubles removing or stoping the service, just hit the create before hit the stop or the remove ;-)

bye... hope it helps

sugestions? bugs? post here....

i will come back later with more details...

[attachment deleted by admin]
Title: Re: NewSoftware HFS2Service
Post by: Josh on October 05, 2006, 01:38:29 AM
Looks good to me, I was trying to set this up as a service this morning but ran into issues with the SC command on win 2003 srv thanks for the timely update!
Title: Re: NewSoftware HFS2Service
Post by: rejetto on October 05, 2006, 01:47:07 AM
much compliments ledufe, for being so active ;)
Title: Re: NewSoftware HFS2Service
Post by: ledufe on October 05, 2006, 02:15:35 AM
hey guys, i am learning now a real program language, but i am still a very very newbee in c#, but i found it very easy to understand, not to learn, and this desire to learn some language started in me after use and see what we can do the help the others developing a software like hfs and other free apps , i started some time ago without even know it..... i started with multimedia builder from media chance, then i found flash and its action script, then i learned asp 1.0 then i used and learned lua just because i found autoplay media studio, and finally i decide to learn some real language and fully suported and documented on the internet, delphi is good but i just could not understand it, and vb is a language that i partially know or have learned because i've learned some asp scripts...
so i began to learn c# and since i've started, something about a month and a half, and im getting even more exited with the possibilities every day, and i decide to help the other by making some programs to put in pratice my "just goted" knologe....hehheh and guess what?? i just found another bug....hey rejetto, now im just begining to feel like you must feel sometimes..... some logic errors are a pain in the ass.....lol ....
well this is my bug fix release of this app, one of my very fisrst.....heheh

- now the remove of the service is ok, and no more errors if the service was installed and you re-open the hfs2service
- the browse function to search, now only search for a exe named "hfs.exe"

well im waiting for your opnion guys.....
thanks for all the downloads
Title: Re: NewSoftware HFS2Service
Post by: Thomas on December 07, 2006, 11:11:25 AM
Hi,

When I run HFS directly, the "Filetime" will show as "Control Panel" -> "Regional and Language Options" time setting.

However, if I run HFS through HFS2Service, then the "Filetime" will only display "fixed" time format.
(Even I change "Regional and Language Options" time setting and useless.)
Thus, it display time AM or PM by "Traditional Chinese font" and it confuse I.
Because I'd like to show all information in english on the website.

OS: Win2003 (Traditional Chinese Version, I can't chane the OS to English version so far. >.<)

Do you have any idea?
Title: Re: NewSoftware HFS2Service
Post by: Fysack on December 07, 2006, 03:16:26 PM
HFS i running as service now. Running like a clock.

Thx ledufe, i was going to make HFS run as service these days so the timing was perfect  :)
Ive barly look at other post about the run as service topics, but its easy to see you have made it more easy with your program.
It was verry userfriendly, and cool looking. And best of all it made my HFS run as a service with a few easy steps.
I use XPpro
Title: Re: NewSoftware HFS2Service
Post by: joao on December 07, 2006, 07:35:03 PM
Ive barly look at other post about the run as service topics, but its easy to see you have made it more easy with your program.
It was verry userfriendly, and cool looking. And best of all it made my HFS run as a service with a few easy steps.
I use XPpro

here too, the hfs is running on my pc as service(windows 2003 server) and in my house too
hfs + hfs-service
good work rejetto and ledufe
there are a few guys in this forum that make it better than any other forum on the web, here we find people that really use, share the information, and sometimes (thats for ledufe) make the original idea even better...

obs. i am a new user from São paulo, and im starting using the hfs these days, but it is good to know that there are brazilians like ledufe... i don´t like guys from Rio de janeiro, but you are one of the good guys, and by the way, im reading the wiki too, and also, there is you again doing the translation, please let me know if you need some help there, at least in the trasnlation of it, i can help.
Title: Re: NewSoftware HFS2Service
Post by: kycken on December 11, 2006, 06:58:49 AM
I have try to test hfs + hfs2Service,but some VFS item cannot load!!!

Try ??is bug or setting problem?

Thanks!
Title: Re: NewSoftware HFS2Service
Post by: ledufe on December 11, 2006, 07:27:24 PM
...before you change the program to services, it'd better to click "save options-->to registry(all users) in order to make setting up-to-date.

and the tip is, do all the configs, save the settings to registry and to file, so the service(the hfs itself) will run with the config that you want, and also, if you want to change the hfs settings when it is running as service, you should or edit the service and run it with the propper account, or stop the service, change what you want, and re-start the service...

 ;D
Title: Re: NewSoftware HFS2Service
Post by: TCube on December 13, 2006, 06:49:27 AM
ledufe ...

Works perfectly W2K Pro Service Pack 4  (http://xs110.xs.to/xs110/06503/mrci.gif) (http://xs.to)
Title: Re: NewSoftware HFS2Service
Post by: hlloyge on December 15, 2006, 09:42:51 PM
Yesss... now I can leave server running without any intervention if the power goes off :)
Thank you. Works like a charm.
Title: Re: NewSoftware HFS2Service
Post by: ledufe on December 15, 2006, 11:42:16 PM
many thanks
Title: Re: NewSoftware HFS2Service
Post by: Zlobomir on December 24, 2006, 10:21:04 PM
Hello,

I had some problems to run HFS (and not only) as a service, actually I have Win 2003 Server Standard and I want several apps to start before I log on. The solution for this (and I assume you want to run it as a service for the same reason) is to use the Windows scheduler. It can run apps right after the OS start, but there is a problem: The app is wrapped to svhost and you can't bring it to front after log on. The only way I found is after log on, simply use Process Explorer to kill hfs.exe and start it again as usually. Is there some chance to start hfs.exe via *.bat file, and in turn start the batch with Win scheduler? 
Title: Re: NewSoftware HFS2Service
Post by: rejetto on December 25, 2006, 12:54:26 AM
i don't understand your problem.
to start hfs via batch file you just need to type C:\hfs.exe in the batch file. so what's the problem?

anyway my advice is not to kill HFS, but to run "hfs -q". this will ask HFS to quit gracefully. it works only with option "only 1 instance" enabled.
Title: Re: NewSoftware HFS2Service
Post by: Zlobomir on December 29, 2006, 09:50:04 PM
i don't understand your problem.
to start hfs via batch file you just need to type C:\hfs.exe in the batch file. so what's the problem?

anyway my advice is not to kill HFS, but to run "hfs -q". this will ask HFS to quit gracefully. it works only with option "only 1 instance" enabled.
Hello,

Sorry for the late reply. The problem - I think any application scheduled to start before log-on remains hidden after the log-on itself, i. e. I can't bring it as a window or twinkle settings. Thanks for hfs -q tip. Now the whole thing may also look like:

1. Shedule HFS to run at PC start (log-on screen).

2. Make some batch like:
@echo off
C:\Extra Prog\HFS\hfs.exe -q
C:\Extra Prog\HFS\hfs.exe
exit 
(feel free to correct the batch, I am not good at this and it's a rough example for my PC)

3. Put the batch into the Startup folder or into HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run or like that  ???

So if the user leaves the PC unattended, with "Enable Startup when power lost" in BIOS, HFS will still start. Later, when the user logs on, HFS will switch automatically to full functionality.
Title: Re: NewSoftware HFS2Service
Post by: maverick on December 29, 2006, 09:59:40 PM

If you want HFS to start at bootup, forget about that batch file, and from the HFS Menu --> select --> Start/Exit --> Run HFS when Windows starts.  Simple as that or am I misunderstanding your problem?
Title: Re: NewSoftware HFS2Service
Post by: rejetto on December 29, 2006, 10:02:05 PM
yes, i know no method to control HFS while running as service.
but i know you can tell a service to run "under" a specific user, dont' know what this mean, but may be related to your problem.
Title: Re: NewSoftware HFS2Service
Post by: MarkV on December 29, 2006, 11:57:30 PM
Services normally have no way to be 'brought to foreground'. As soon as HFS runs as service, it's invisible to the user. Most programs that run as a service and have a GUI consist of actually two parts: The service part, and a 'frontend' for the service. The only part of the program communicating with the user is the frontend part. The frontend then controls the service. This may be the case even if there is only one .exe, the service continues to run even if you close the frontend part (e. g. when you log out).

AFAIK there is no way to access the HFS GUI as long as it's running as a service. Of cource you could edit the HFS.INI directly and have a commandline switch in HFS to reload the settings/VFS, but you can't edit the filesystem. You have to restart as a normal program to do that.

The account or user a service runs under primarily deals with permissions (access to network shares etc.), it does not allow that user to access the GUI.

MarkV
Title: Re: NewSoftware HFS2Service
Post by: rejetto on December 30, 2006, 12:42:07 AM
file system editing is limited to just adding files/folders, since it can be done through the command line
Title: Re: NewSoftware HFS2Service
Post by: orph4824 on November 05, 2007, 05:49:52 PM
Hello, been running HFS for awhile. I installed HFS as a service using a program called FireDaemon it lets you install most any program includeing console apps and run them as a windows service. I also run a full PHP/SQL setup yet I use HFS as my "front page".
Title: Re: NewSoftware HFS2Service
Post by: ELEVENNNN on November 05, 2007, 08:51:26 PM
Leandro this is so good! Great work and thanks for being so dedicated... I will be using this because the PC that runs my HFS server is used for a few other experimental things and I always end up doing something stupid to close HFS and/or kill it.  Regardless of the reason people use this, thank you for all the time you spend.. great work.

I cant remote in from this domain (against AUP) but on my break I'll get it setup, thank you!

-Kurt
Title: Re: NewSoftware HFS2Service
Post by: ELEVENNNN on November 07, 2007, 03:43:58 AM
Crap... I forgot to test it period. I went home, did some stuff and some other stuff and never used it.  My bad.  But I guess you know it works so it doesnt really matter.  I'm working crazy late tonight so I don't think I'll be testing it tonight and since its against the AUP to login remotely as I said, I guess I'll just do it tomorrow..

Once again LeDuFe, I think i love you..

-Kurt
Title: Re: NewSoftware HFS2Service
Post by: Esente on March 21, 2008, 10:04:48 PM
Regarding the software hfs2Service, I have a problem when starting HFS. My HFS folder is in a network drive, since I want to run in from other computers when needed. Whenever I run HFS, it will ask to make sure I want to run from network location. And that's why hfs2Servuce can's start HFS. Is there possible that your program can surpress the warning dialog, or choose Yes answer by default?
Title: Re: NewSoftware HFS2Service
Post by: Fysack on March 24, 2008, 02:01:08 AM
lol funny i got sucked in to this tread right now. Sorry Esente, personally i dont know, i use vista 64bit these days, and "never" restart.
Have you thought of maybie use hfs on a usb key..?