User Tools

Site Tools


windows_10_command_prompt

Windows Command Prompt

Overview

The use of the Windows Command Prompt, or Console, can be a powerful tool for testing barcode scanning since it is able to show the STX Preamble, also known as the Ctrl+B (^B) character. In addition, the barcode should append a Carriage Return (CR) suffix, which will not be shown on the screen, but is automatically handled by the command prompt.

If a barcode is scanned into a text editor, such as Notepad, the ^B character will not be shown but the Carriage Return will still be handled since the next scan of a barcode will append to a new line.


Changes in Windows 10

The Windows 10 Command Prompt brings about some features (See here for details) that changes the way that it behaves when a barcode is scanned into it. For example, the Console will enter 'Mark Mode', and will not process the Carriage Return that the barcode scanner attaches to the barcode. This may cause confusion when troubleshooting barcode scanning at the command prompt, since the behaviour differs to previous versions of Windows Command Prompt.

Default Behaviour

When a barcode is scanned into the Windows 10, the barcode will be displayed as expected, but will not process the Carriage Return. The text that is entered becomes fixed and entering or deleting text will not do anything on the command line (1). It is possible to press the 'Esc' key to leave 'Mark Mode', or press the 'Enter' key once, to exit 'Mark Mode' (2), or twice to process the barcode and display the smiley face (:-)), followed by the barcode number (3).

Legacy Console

To change the behaviour of the Windows 10 Command Prompt so that the new features are disabled, it is necessary to enable the 'Use legacy console' setting in the Properties settings, as follows:

1. Run the Command Prompt: Press WIN+R to bring up the Run dialogue box, type CMD and press OK.

2. Right-click on the Command Prompt Icon, and select Properties from the menu.

3. Place a check mark in the box labelled “Use legacy console” and press OK.

4. Restart the Command Prompt.

After following these steps, scanning a barcode into the Windows 10 Command Prompt will now mimic the behaviour of scanning into a previous version of Windows Command Prompt: The barcode will be scanned showing the ^B prefix, followed by the barcode number and a Carriage Return. The Command Prompt will no longer enter 'Mark Mode', and will allow for further barcode scanning or other commands to be entered.


Created by David Cartwright - 10 May 2016

myWindward

windows_10_command_prompt.txt · Last modified: 2016/09/28 16:30 (8 years ago) by dcartwright