From ae74cea6ac07f195032c7e8a18219ed60b83fd82 Mon Sep 17 00:00:00 2001 From: mataha Date: Wed, 7 Jun 2023 04:27:36 +0200 Subject: [PATCH] Don't run with Command Extensions disabled --- templates/cmd.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/cmd.txt b/templates/cmd.txt index 0256e8f..90ae986 100644 --- a/templates/cmd.txt +++ b/templates/cmd.txt @@ -28,9 +28,10 @@ {%- let section = "@rem ==========================================================================\n@rem" -%} {%- let not_configured = "@rem -- not configured --" -%} -@echo off & setlocal DisableDelayedExpansion EnableExtensions +@echo off & (set ComSpec) >nul 2>nul || exit /b 0 2>nul +setlocal DisableDelayedExpansion EnableExtensions -@if "%~f0"=="%~dpnx0" ( +if /i "%~f0"=="%~dpnx0" ( set ^"$p=%%