I registered a custom URL handler in Windows, in order to be able to launch a local program from an URL. Following the MSND documentation, I inserted the following values in the Registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\TestLaunch]
@="URL:TestLaunch Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\TestLaunch\DefaultIcon]
@="\"c:\\temp\\test.bat\""
[HKEY_CLASSES_ROOT\TestLaunch\shell]
[HKEY_CLASSES_ROOT\TestLaunch\shell\open]
[HKEY_CLASSES_ROOT\TestLaunch\shell\open\command]
@="\"c:\\temp\\test.bat\" %1"
This works, but when I click a TestLaunch:
link and the batch file starts I can see the console windows appearing. Since the role of the batch file is just parsing the argument url and launching another application, I would like the console non to appear (or at least being minimized), even if it is just for a fraction of a second.
The only thing that came to my mind is creating a link to the batch file (test.bat.lnk
) and set it to start as minimized, but that won't work.
Any other ideas ? I'm open to an alternative to batch files, but I'd like to stick to what Windows provides
You could use VBS?
Using
Some workarounds can be found here:
https://superuser.com/questions/62525/run-a-completly-hidden-batch-file
Launch a program from command line without opening a new window
http://www.tomshardware.co.uk/forum/245566-45-batch-file-window-poping
http://www.joeware.net/freetools/tools/quiet/index.htm
http://www.ntwind.com/software/hstart.html