@@ -97,7 +97,11 @@ pause rem remove
9797 echo The program will now restart.
9898 call :GrayPause
9999 del " %updateFileName% "
100- goto AskProceed
100+ if /i " %par_silent% " == " true" (
101+ (goto) 2 > nul & " %~f0 " --silent --update false --ffmpegloc " %par_ffmpegloc% "
102+ ) else (
103+ (goto) 2 > nul & " %~f0 "
104+ )
101105 ) else (
102106 echo %iconyellow% ^^! %formatend% Differing version found^^! ^ (%textred%%CurrentVersion%%formatend% -^ > %textgreen%%UpdateVersion%%formatend% ^ )
103107 echo Proceeding with update in 5 seconds, press CTRL+C or close window to cancel.
@@ -109,7 +113,11 @@ pause rem remove
109113 echo %icongreen% i %formatend% Download complete. The program will now clean up and restart.
110114 call :GrayPause
111115 del " %updateFileName% "
112- (goto) 2 > nul & " batch encoder %UpdateVersion%%append% .bat" --updated-from " %~f0 "
116+ if /i " %par_silent% " == " true" (
117+ (goto) 2 > nul & " batch encoder %UpdateVersion%%append% .bat" --updated-from " %~f0 " --silent --update false --ffmpegloc " %par_ffmpegloc% "
118+ ) else (
119+ (goto) 2 > nul & " batch encoder %UpdateVersion%%append% .bat" --updated-from " %~f0 "
120+ )
113121 )
114122
115123:FFMPEGLocation
@@ -118,7 +126,8 @@ pause rem remove
118126 if not defined par_ffmpegloc (echo Error: --silent switch used but --ffmpegloc [path] not provided. & exit /b 1)
119127 set " par_ffmpegloc = %par_ffmpegloc:" =% "
120128 if not exist " %par_ffmpegloc% " (
121- echo " Error: --ffmpegloc path provided does not exist." & exit /b 1
129+ echo Error: --ffmpegloc path " %par_ffmpegloc% " provided does not exist.
130+ exit /b 1
122131 ) else (
123132 set " LOCATION = %par_ffmpegloc% "
124133 goto Count
@@ -231,11 +240,11 @@ echo [42;97m Completed encoding %TOTAL% files. %formatend%
231240 if /i " %par_silent% " == " true" (exit /b 2)
232241 echo The program will now restart.
233242 call :GrayPause
234- goto AskProceed
243+ ( goto) 2 > nul & " %~f0 "
235244
236245:GrayPause
237246 echo %textgray%
238- pause
247+ if /i not " %par_silent% " == " true " ( pause)
239248 echo %formatend%
240249 goto :eof
241250
0 commit comments