Solved Code in windows batch to disable closing comandprompt window

September 1, 2018 at 16:57:20
Specs: Windows 10
Hi am writing a bat script with a user interface that launches a command prompt window and would like to disable the feature of closing the CMD window.

could you please send me the code to do so?

it would be grately apreciated,

Thanks! ;}


See More: Code in windows batch to disable closing comandprompt window

Reply ↓  Report •

#1
September 4, 2018 at 08:03:46
✔ Best Answer
add one of these lines:
pause>nul
or pause
or timeout (timeout /? for more info)


if you're starting more cmd.exe windows from a batch script you can start them with the /K(eep) switch
for example:

start cmd.exe /K "echo see what i did here?"


you can also just type help in a cmd window, it will show you most commands.

want to know more about a command in the "help" list?

type:
commandname /?

i5-6600K[delid]@4.8GHz/4.3GHz@1.4v LLC=6 | 2x4GB Crucial-DDR4-2133CL15@14-14-14-28 1T 2700MHz@1.35v
MSI Armor RX 570 4GB@1340Mhz core@1.110v/1865MHz BiosModded


Reply ↓  Report •
Related Solutions


Ask Question