 						if (timerfTemp)
 						{
 						Process, Exist, % timerfTemp
+						timerBtch := PrgBatchIni%btchPrgPresetSel%[A_Index]
 							if (ErrorLevel)
 							{
 							timerTemp .= "Active" . "|"
-							timerBtch := PrgBatchIni%btchPrgPresetSel%[A_Index]
 							lastMonitorUsedInBatch := PrgMontoRn[timerBtch]
 							}
 							else
 							{
-								if (!PrgMonPID.delete(timerfTemp))
+								if (PrgChgResPrgOnClose[timerBtch] && !PrgMonPID.delete(timerfTemp))
 								{
-								timerBtch := PrgBatchIni%btchPrgPresetSel%[A_Index]
 								MsgBox, 8192, PID Check, % "PID for " . PrgChoiceNames[timerBtch] . " never existed!"
 								}
 							PrgListPID%btchPrgPresetSel%[A_Index] := "ENDED"

maxBatchPrgs := 6
batchActive := 0 ; (1) Batch is Active for current Preset (-1) flagged for Not Active (0) Not active (2) Batch active at start
lnchPrgIndex := 0 ; (PrgIndex) Run, (0) Change Res or -(PrgIndex) Cancel
lnchStat := 0 ; (-1) Test Run; (1) Batch Run; (0) BatchPrgStatus Select
lastMonitorUsedInBatch := 0
listPrgVar := 0 ; copy of BatchPrgs listbox id
presetNoTest := 2 ; 0: config screen 2: return to or load of batch screen: 1: else e.g. Not click on preset 1: preset clicked

	targMonitorNum := PrgMonToRn[-lnchPrgIndex]
	}

	lnchStat := 1


	strRetVal := LnchPrgOff(batchPrgStatus, lnchStat, PrgChoiceNames, temp, PrgLnkInf, PrgResolveShortcut, IniFileShortctSep, currBatchno, lnchPrgIndex, PrgCmdLine, iDevNumArray, dispMonNames, dispMonNamesNo, regoVar, PrgMonPID, PrgRnMinMax, PrgRnPriority, PrgBordless, borderToggle, targMonitorNum, PrgPID, PrgListPID%btchPrgPresetSel%, PrgPos, PrgMinMaxVar, PrgStyle, x, y, w, h, dx, dy, btchPowerNames[btchPrgPresetSel])
