Answer
Following an SO post:
I was able to create a shortcut that achieves my purposes, using VB as well. At the very least, this will launch the application. Closing may be another concern and I still need to test this with Elixir Desktop. However, these are questions that likely deserve their own posts, so if I find the need, I will leave them for later.
Instructions
-
Follow instructions to create the project from the question above (you may need to enable server options in
config/prod.exs
) -
Go to
demo_umbrella\_build\prod\rel\demo\bin
where the newly createddemo.bat
file is -
Create a file called
invisible.vbs
and add in the following content:
CreateObject("Wscript.Shell").Run "" & WScript.Arguments(0) & "", 0, False
- Create a Windows shortcut, that looks like this:
The value on the Target
field is:
%windir%\system32\wscript.exe invisible.vbs "demo.bat start"
- Upon clicking the shortcut, the application will be launched behind the scenes and you will be able to check it under
localhost:4000
.
This shortcut will run the files from the folder it is in, so you can safely move things around provided you always keep it in the same folder the rest of the files are.
Being a shortcut, it also means you can change the icon to anything you want.