Home > Net >  cmd.exe stays open after start command opeing multiple files
cmd.exe stays open after start command opeing multiple files

Time:10-14

I already googled and tried several solutions but without success...

My batch script looks the following, it opens four files but then cmd.exe window stays open and cannot be closed anymore. Even Task Manager asks for admin rights if I want to close. I am no admin, only normal user, so to force closing the cmd window I can only logoff and re-login to windows. I already tried several options ("/b" option on start command, "exit" command at the end, also "exit 0" ... without any difference)

start "" /b "file1.xlsx"
@ping -n 3 localhost> nul
start "" /b "file2.xlsx"
@ping -n 1 localhost> nul
start "" /b "file3.xlsx"
@ping -n 1 localhost> nul
start "" /b "file4.xlsx"

I am using Windows 10 Enterprise 21H2.

CodePudding user response:

At the bottom add: :end exit

Then most probably you can solve this

  • Related