Add configure.bat for executing PowerShell script and update runner-launcher.vbs comments for clarity
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0configure.ps1"
|
||||
@@ -1,8 +1,7 @@
|
||||
' 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.
|
||||
' Starts runner.ps1 without stealing foreground focus.
|
||||
' Uses a minimized/no-activate launch style so the process stays interactive
|
||||
' for dialogs without jumping in front of the active window.
|
||||
|
||||
Option Explicit
|
||||
|
||||
@@ -17,9 +16,10 @@ 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
|
||||
' Window style 7 = SW_SHOWMINNOACTIVE.
|
||||
' Do not use style 0 here; that can prevent interactive dialogs from rendering.
|
||||
' PowerShell's own -WindowStyle Hidden should suppress the console, while the
|
||||
' shell launch style avoids foreground activation if a window is created briefly.
|
||||
shell.Run cmd, 7, False
|
||||
|
||||
WScript.Quit 0
|
||||
|
||||
Reference in New Issue
Block a user