I've got quite far. But it seems that running Shiny in batch mode won't launch the browser. Nevermind the following script can start the browser after launch R
'HideBat.vbs
CreateObject("Wscript.Shell").Run "yourBatch.bat", 7, False
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run("""GoogleChromePortable\GoogleChromePortable.exe""")
Set objShell = Nothing
However now I run into two problems:
1. Sometimes shiny can take a few seconds to start so chrome can get started before Shiny initialise which leads to url not found error.
2. How do I know to close the program when chrome closes?
Looking into other possible vbs script solutions. Please suggest if you can think of anything!