# HG changeset patch # User John Donoghue # Date 1661193115 14400 # Node ID ae320ffbbbe08a938cb00606da99e17d93e599ef # Parent 6d085baf3a99aef5c940708604ec68c5c710c158 * installer-files/octave-firsttime.vbs, installer-files/octave.vbs: forward input args when respawning cscript from a wscript run diff -r 6d085baf3a99 -r ae320ffbbbe0 installer-files/octave-firsttime.vbs --- a/installer-files/octave-firsttime.vbs Sat Jul 30 15:42:25 2022 +0200 +++ b/installer-files/octave-firsttime.vbs Mon Aug 22 14:31:55 2022 -0400 @@ -5,7 +5,12 @@ ' If running with wscript.exe, "Exec" will flash a window for a split second. ' Relaunch with cscript.exe which doesn't show that window. If InStr(1, WScript.FullName, "wscript.exe", vbTextCompare) > 0 Then - WScript.Quit wshShell.Run("cscript.exe """ & WScript.ScriptFullName & """", 0, True) + AllArgs = "" + Set wshArgs = WScript.Arguments + For I = 0 to wshArgs.Count - 1 + AllArgs = AllArgs & " " & chr(34) & wshArgs(I) & chr(34) + Next + WScript.Quit wshShell.Run("cscript.exe """ & WScript.ScriptFullName & """" & AllArgs, 0, True) End If diff -r 6d085baf3a99 -r ae320ffbbbe0 installer-files/octave.vbs --- a/installer-files/octave.vbs Sat Jul 30 15:42:25 2022 +0200 +++ b/installer-files/octave.vbs Mon Aug 22 14:31:55 2022 -0400 @@ -5,7 +5,12 @@ ' If running with wscript.exe, "Exec" will flash a window for a split second. ' Relaunch with cscript.exe which doesn't show that window. If InStr(1, WScript.FullName, "wscript.exe", vbTextCompare) > 0 Then - WScript.Quit wshShell.Run("cscript.exe """ & WScript.ScriptFullName & """", 0, True) + AllArgs = "" + Set wshArgs = WScript.Arguments + For I = 0 to wshArgs.Count - 1 + AllArgs = AllArgs & " " & chr(34) & wshArgs(I) & chr(34) + Next + WScript.Quit wshShell.Run("cscript.exe """ & WScript.ScriptFullName & """" & AllArgs, 0, True) End If ' get the directory that script resides in