MS VS2013 vsdevcmd.bat fails to run with tcmd 17 x64

May 2, 2009
10
0
#1
This type of line returns a syntax error from req query:

@echo off
for /F "tokens=1,2*" %%i in ('reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "12.0"') DO (
@if "%%i"=="12.0" (
echo found
@SET "VS120COMNTOOLS=%%k"
)
)

Duplicate cmd.exe bugs option makes no difference.
 
May 2, 2009
10
0
#6
Even a simpler version shows the same problem ( I am running tcmd elevated):

for /F "tokens=1,2*" %i in ('reg query HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7 /v 12.0') do echo %i

Same problem happens both on my host machine and a vmware virtual machine running the same os.

Current windows user has a space in its name. If I sign in as the administrator user it works.
 
May 2, 2009
10
0
#9
I don't understand it either. But I believe I have proved it experimentally. If the profile folder in c:\users has a space in the path then the batch fails. Maybe its to do with the full path to tcmd.ini containing a space.

For my original user I renamed the folder in c:\users to remove the space and updated the profile path in the registry in the subkey of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList that corresponds to my user and now tcmd runs the batch file ok.