Skip to content

Commit

Permalink
fix to prevent multiple windows setup starting
Browse files Browse the repository at this point in the history
  • Loading branch information
jmclaren7 committed Mar 29, 2024
1 parent 8797bff commit b6a6de2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Helper/Main.au3
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,20 @@ While 1
EndIf

Case $NormalInstallButton
_Log("NormalInstallButton")
If ProcessExists($hSetup) Then
_Log("Setup is already running")
MsgBox(0, "Error - " & $Title, "Setup is already running, please close it first")
ContinueLoop
EndIf
$hSetup = _RunFile($SystemDrive & "sources\setup.exe", "/noreboot")
$NormalInstallWait = True
$AutoInstallWait = False

Case $AutomatedInstallButton, $FormatButton
If IsDeclared($hSetup) And ProcessExists($hSetup) Then
_Log("AutomatedInstallButton")
If ProcessExists($hSetup) Then
_Log("Setup is already running")
MsgBox(0, "Error - " & $Title, "Setup is already running, please close it first")
ContinueLoop
EndIf
Expand Down Expand Up @@ -366,7 +374,8 @@ While 1

; Wait for normal install to finish
If $NormalInstallWait And Not ProcessExists($hSetup) Then
$RebootPrompt = True
_Log("Normal install finished")
$RebootPrompt = True ; Will trigger a prompt that will reboot on timeout
$NormalInstallWait = False
EndIf

Expand Down

0 comments on commit b6a6de2

Please sign in to comment.