Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On which Windows systems are Command Extensions disabled by default?

According to this page on setlocal Windows batch command, Command Extensions are enabled by default. Are there any Windows systems where it is not enable by default? Do I really need to explicitly include setlocal EnableExtensions in any of my batch scripts?

like image 561
Dan Stevens Avatar asked Jul 18 '12 15:07

Dan Stevens


People also ask

Are command extensions enabled?

By default command extensions are enabled. However, to be absolutely sure that they are, either use SETLOCAL ENABLEEXTENSIONS within your NT shell scripts (batch files) or execute those scripts using CMD /X . Likewise, you may disable command extensions using SETLOCAL DISABLEEXTENSIONS or CMD /Y .

Where are the DOS commands in Windows 10?

Open Command Prompt in Windows 10 Move the mouse pointer to the bottom-left corner of the screen and Right-click, or press Windows key + X. In the power user task menu, select Command Prompt (Admin) (Figure 8). This will open the Command Prompt window (Figure 9).

What are cmd extensions?

When cmd.exe is started, command extensions are enabled or disabled by giving either the /e:on or /e:off option. In a batch file, command extensions can be enabled with setlocal enableExtension . Command extensions affect the following commands and features.


1 Answers

They can always be disabled in the registry and if that's possible there are probably systems where it's the case. I haven't found any such system, though.

like image 187
Joey Avatar answered Sep 30 '22 17:09

Joey