After applying this SO answer on my system, I noticed that clicking on .bat
files now results:
"/c" is not recognized as an internal or external command
And in an attempt to fix it I tried to replace the quotes in %CMDCMDLINE%
in the IF
expression using the Environment variable substitution
. And then I noticed something strange. Here's my test batch file:
@echo off
echo _%CMDCMDLINE%_
echo _%CMDCMDLINE:"=_%_
echo _%CMDCMDLINE%_
pause
and this is its output:
_C:\Windows\system32\cmd.exe /c ""C:\cygwin\opt\openconnect64\rek.bat" "_
_C:\Windows\system32\cmd.exe /c __C:\cygwin\opt\openconnect64\rek.bat_ __
_C:\Windows\system32\cmd.exe /c __C:\cygwin\opt\openconnect64\rek.bat_ __
As you can see, although there's no assignment, the variable is altered. This doesn't occur for other environment variables with the same value.