Skip to content

The run_app_no_console.bat still generates a flashing console #2

Description

@heetbeet

A suggested fix is to replace run_app_no_console.bat with run_app_no_console.vbs with the following content:

'*************************************************
' Run the run_app.bat file silently
'*************************************************

'adapted from http://superuser.com/questions/140047/how-to-run-a-batch-file-without-launching-a-command-window/390129
ScriptFullPath = Wscript.ScriptFullName
ScriptName = Wscript.ScriptName
Path = Mid(ScriptFullPath, 1, Len(ScriptFullPath)-Len(ScriptName))

'Generate the following command
'"$Path\run_app.bat" "arg1" "arg2" "arg3" ...
RunCmd = chr(34) & Path & "run_app.bat" & chr(34) 
If WScript.Arguments.Count >= 1 Then
    For i = 0 To WScript.Arguments.Count-1
        Arg = WScript.Arguments(i)
        If InStr(Arg, " ") > 0 Then Arg = chr(34) & Arg & chr(34)
        RunCmd = RunCmd & " " & Arg
    Next
End If

'MsgBox(RunCmd)
CreateObject("Wscript.Shell").Run RunCmd, 0 , True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions