' runner-launcher.vbs ' Starts runner.ps1 without a visible console window. ' Uses a shown/minimized style (not 0) so the process joins the interactive window station, ' which is required for WinForms dialogs to appear. PowerShell's own ' -WindowStyle Hidden suppresses the console window. Option Explicit If WScript.Arguments.Count < 1 Then WScript.Quit 1 End If Dim runnerPath runnerPath = WScript.Arguments(0) Dim shell, cmd Set shell = CreateObject("WScript.Shell") cmd = "powershell.exe -NoLogo -NoProfile -Sta -WindowStyle Hidden -ExecutionPolicy Bypass -File """ & runnerPath & """" ' Window style 1 = SW_SHOWNORMAL — do NOT use 0 here. ' Style 0 (CREATE_NO_WINDOW) detaches the process from the interactive ' window station, which prevents WinForms dialogs from rendering. ' PowerShell's own -WindowStyle Hidden flag suppresses the console window. shell.Run cmd, 1, False WScript.Quit 0