I had some scripts that was similar to this that did not close a variable in a set statement that stopped working in TCC 17.
Here is a simple batch files that gets the path of the script and removes the trailing backslash:
On cmd.exe (Windows 8.1), it does this:
On TCC 16 it does the same thing as cmd.exe:
On TCC 17, it does this and hangs waiting for the user prompt:
Here is a simple batch files that gets the path of the script and removes the trailing backslash:
Code:
rem Get the path from our script and remove the trailing \
set ROOT_DIR=%~dp0
set ROOT_DIR=%ROOT_DIR:~0,-1%
echo Root is %ROOT_DIR%
On cmd.exe (Windows 8.1), it does this:
Code:
E:\Temp>test.bat
E:\Temp>rem Get the path from our script and remove the trailing \
E:\Temp>set ROOT_DIR=E:\Temp\
E:\Temp>set ROOT_DIR=E:\Temp
E:\Temp>echo Root is E:\Temp
Root is E:\Temp
On TCC 16 it does the same thing as cmd.exe:
Code:
rem Get the path from our script and remove the trailing \
set ROOT_DIR=E:\Temp\
set ROOT_DIR=E:\Temp
echo Root is E:\Temp
Root is E:\Temp
On TCC 17, it does this and hangs waiting for the user prompt:
Code:
rem Get the path from our script and remove the trailing \
set ROOT_DIR=E:\Temp\
Cancel batch job E:\Temp\test.bat ? (Y/N/A) :