In my batch file I started to use variables and suddenly the following commands do not work anymore.
Here is the part of my code with the problem
SET "path=MyPath"
REG ADD "HKCU\Software\ETC\ETC" /f /v "MyRegNameA" /t REG_SZ /d "%path%\ETC\"
REG ADD "HKCU\Software\ETC\ETC" /f /v "MyRegNameB" /t REG_SZ /d "%path%"
PAUSE
START "" "%path%\MyProgram.exe"
This code works without the SET...
and of course with MyPath
instead of %path%
. Error Message is:
The command "REG" is either spelled wrong or couldn't be found
I previously found how to use Variables here: stackEx.SetVariables To my knowledge I am doing it exactly as supposed, and I couldn't find specific help so far.