aGerman wrote:What happens if you only close the tab with your html file instead of the whole Chrome window?
Nothing, the cmd window is frozen.
Moderator: DosItHelp
aGerman wrote:What happens if you only close the tab with your html file instead of the whole Chrome window?
Code: Select all
:LOOP
echo Banana
goto LOOP
misol101 wrote:I have run into something confusing. Some programs, when run from a batch program, seems to block forever, even after the program quits! I am then forced to close down the cmd window, Ctrl-C/Z/break do not work.Code: Select all
::"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" (1)
::call "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" (2)
::cmd /C "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" (3)
::start C:\Program Files (x86)\Google\Chrome\Application\chrome.exe (4)
::start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" (5)
::start cmd /C "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" (6)
start /B cmd /C "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" (7)
foxidrive wrote:This is a longish thread - but in essence the batch will stop because it is missing "" after the start keyword.
misol101 wrote:No, surprisingly it runs as expected, the problem is another (as the thread explains)
misol101 wrote:Case (5): A new cmd window is opened, and nothing else happens (why is it like this?)
foxidrive wrote:misol101 wrote:Case (5): A new cmd window is opened, and nothing else happens (why is it like this?)
This is what is in your question and what I was addressing.
misol101 wrote:Ok, that was a side question, not the main one. But agreed, you did answer that. Thank you.
Code: Select all
"C:\Program Files\Google\Chrome\Application\chrome.exe"
Code: Select all
"c:\Program Files\Mozilla Firefox\firefox.exe"
foxidrive wrote:...the issue you see on the first command in the initial question is with Chrome.
If you try the same thing with Firefox it will release the batch script and is what all multi-threaded GUI programs should do.
aGerman wrote:Did you have a look into the Task Manager and were all Chrome processes terminated?
In a file explorer, that is not good.
aGerman wrote:Um ... from my point of view file explorers should run them rather asynchronously. At least I would complain if the Windows Explorer wouldn't ...
I don't want new cmd windows to open when running bat and console exe files.
I think my "solution" to this will be to use: call "file" for bat and exe files, and: start "" "file" for all other extensions.
misol101 wrote:start /B "" "file.bat"
has the same side effects (and the side effect is that my external exe file, which runs getch to get key input, no longer gets any input).
misol101 wrote:The issue is within my listb file explorer though, so I can't really "choose" which programs the user runs, Chrome is just an example of a faulty one.
Launch this batch script in Windows where Chrome is not running and Chrome will not release the batch script. The echo line does not appear, unless Chrome is already running.
@echo off
"C:\Program Files\Google\Chrome\Application\chrome.exe"
echo Now on to other batch aspects
pause
A multi-threaded GUI program should not behave like this.
foxidrive wrote:I've not seen this happening with other utilities and using /b with start. Have you experienced this with any other batch script?
foxidrive wrote:Just googled a bit - this problem was evident at least three years ago.
http://stackoverflow.com/questions/1434 ... mmand-line