QuickEdit mode can be useful if you wish to quickly highlight and copy text directly from the command prompt instead of redirecting output to a file. However, it has its drawbacks. If you have a batch script running, selecting text in the console will pause the script execution until the text is deselected. This can be a problem if the script is expected to continue without pause.
How can one disable QuickEdit mode for certain BATCH scripts?
Unfortunately, there is no way to edit the QuickEdit setting of the current CMD Console instance from command line. We can, however, temporarily disable the global QuickEdit setting and start a new console instance. There are a couple ways to do this, each with its own perks (pros) and drawbacks (cons). Both of the following solutions require the ability to modify the registry.
REGEDIT
CON: Requires the creation of temporary REG files
Code (goes at the beginning of your script):
REG
CON: Different versions have different syntax (accounted for in code below)
Code (goes at the beginning of your script):
If you have another solution, feel free to post.
A way that will affect the current command prompt session.
Here's
quickEdit.bat
. It is a self-compiled .net script so it requires .net installed (not installed by default on Winsows XP/2003).Usage:
Enable:
Disable:
Get State: