rejetto/hfs

Can the window version of the hfs be resident in the system tray area?

pengyangjin opened this issue · 4 comments

At present, when the window version of hfs is enabled, it can only stay in the window status bar.Can it be changed to be resident in the system tray area?

i'm not sure if hfs will ever do that, as there are some technical problems with it.
I think it's better if a separate app is done, only for windows. A small "runner" app, that will launch hfs and stay in the tray.
This is so separate that someelse could do it, for example using Delphi.

Maybe it could even be distributed as a plugin, but i'm not sure.

Edit: Re-read what you asked for, and running it in tray is fully possible with windows terminal.

If you want it in tray area so you can pop it out you can start server in windows terminal with a shortcut.
Make a profile in Windows Terminal named HFS, and set profile to minimize to tray.
Shortcut:
wt.exe -w HFS -p HFS

and make commandline (run command):
%SystemRoot%\System32\cmd.exe /C node "F:\Users\xxxx\AppData\Roaming\npm\node_modules\hfs\src\index.js"
Might work with just this in commanline for profile, but the above one is surefire as long as node is in path.
node "F:\Users\xxxx\AppData\Roaming\npm\node_modules\hfs\src\index.js"


I'll leave the non-relevant answer here anyway, someone might get use for it:

If you run the server with autohotkey with a really short and simple script it can be hidden.


Global nodePID
; Set a timer to check that node is running, else start it and save Process ID in nodePID. Value can be changed to desired intervals in ms, this is once a minute.
SetTimer, CheckHFS, 60000

; Start webserver, save ProcessID into nodePID variable
#SingleInstance Force
#Persistent 
; #NoTrayIcon ; Uncomment to also hide tray icon

Process, Exist, node.exe,
if !ErrorLevel
	Run, node "F:\Users\xxxx\AppData\Roaming\npm\node_modules\hfs\src\index.js",,hide,nodePID
else
	nodePID := ErrorLevel 

CheckHFS()
{
	Process, Exist, %nodePID%
	if !ErrorLevel
	{
		Run, node "F:\Users\xxxx\AppData\Roaming\npm\node_modules\hfs\src\index.js",,hide,nodePID
	}
	Return
}

Note that this checks for node.exe, so it only works if node isn't allready running with other tasks.

Thank you very much for your response, I decided to use this  Delphi version which is also very good.

i wouldn't do it: Delphi version has an unfixed vulnerability that will allow anyone to take control of your computer.
rapid7/metasploit-framework#19240