basically I am having a weird issue when I try to use a batch file to pull a bit of text from a text file - I try and turn it into a variable and then write that variable to the value of a registry key. It's fairly straight forward but when I execute the file, the reg part completely ignores the variable (the key ends up having /f in it, instead of what I want). See below.
for /F "delims=" %%i in (C:\temp\output.txt) do set "wowvar=%%i"
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\CentraStage /v Custom1 /t REG_SZ /d %xwowvar% /f
and when it's done, I get the following output...
C:\Temp1>for /F "delims=" %i in (C:\temp\output.txt) do set "wowvar=%i"
C:\Temp1>REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\CentraStage /v Custom1 /t REG_SZ /d
The operation completed successfully.
(Output.txt only has about 8 characters in it, it's just a date, it's always 100% there)
Any help would be greatly appreciated.