By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

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

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

Duplicate cmd.exe bugs option makes no difference.
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.
Created a new windows user just using my first name. Works ok there as well. So only fails if the windows user is named <first name><space><last name>.
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.

Similar threads