Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Terminate the batch process (yes/no)?" prompt if run from batch #12

Open
VegethB opened this issue Sep 15, 2022 · 0 comments
Open

"Terminate the batch process (yes/no)?" prompt if run from batch #12

VegethB opened this issue Sep 15, 2022 · 0 comments

Comments

@VegethB
Copy link

VegethB commented Sep 15, 2022

As the title suggests, if I use the software within a batch, this will ask me if I want to terminate it (choosing "no" continues the rest of the batch).

My .bat output
B:\App>KomgaUpdater.bat

B:\App>setlocal

B:\App>set "yourDir=B:\SERVER\Komga\"

B:\App>set "yourExt=*.jar"

B:\App>pushd B:\SERVER\Komga\

B:\SERVER\Komga>for %a in (*.*.jar) do set Komga=%a

B:\SERVER\Komga>set Komga=komga-0.157.1.jar

B:\SERVER\Komga>popd

B:\App>for /F "TOKENS=1" %a in ('wmic PROCESS where "name like '%java.exe%' AND CommandLine like '%java.exe% -jar -Xmx3g komga-0.157.1.jar%'" get Processid | findstr [0-9]') do set MyPID=%a

B:\App>set MyPID=11708

B:\App>echo  11708
 11708

B:\App>B:\App\Windows-Kill\windows-kill.exe -2 11708
Windows Kill 1.1.4 | Windows Kill Library 3.1.3
Signal sent successfuly. type: 0 | pid: 11708
Terminare il processo batch (S/N)? n

B:\App>TIMEOUT /T 10

In attesa da  0 secondi. Premere un tasto per continuare...

B:\App>cd "B:\SERVER\Komga\"

B:\SERVER\Komga>del "komga-0.157.1.jar"

B:\SERVER\Komga>lastversion download https://github.com/gotson/komga --assets
Downloaded komga-0.157.2.jar: : 135336.0KB [00:27, 4979.18KB/s]
Downloaded komga-0.157.2.jar.sha256: : 8.0KB [00:00, 2001.58KB/s]

B:\SERVER\Komga>start "komga" "C:\Users\Administrator\Desktop\Komga.lnk"

B:\SERVER\Komga>endlocal

B:\App>pause
Premere un tasto per continuare . . .
B:\App>

Having to enter "n" by hand to get the script to continue is not the best...

Having a switch that prevents the program from prompting (if possible) would be handy.
Type: Windows-kill.exe --no-prompt -2 1234

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant