diff --git a/data/scrcpy-noconsole.vbs b/data/scrcpy-noconsole.vbs index e11adba56d..4241737b15 100644 --- a/data/scrcpy-noconsole.vbs +++ b/data/scrcpy-noconsole.vbs @@ -1 +1,14 @@ -CreateObject("Wscript.Shell").Run "cmd /c scrcpy.exe", 0, false +Set Args = WScript.Arguments + +strCommand = "cmd /c scrcpy.exe" + +If (Args.Count > 0) Then + strArg = "" + For Each Arg In Args + strArg = strArg + " " + Arg + Next + + strCommand = strCommand + strArg +End If + +CreateObject("Wscript.Shell").Run strCommand, 0, false