I have a batch file which is checking the value of a registry key.
I have the file reading the value and deleting the blank line at the beginning of the file, but there are still spaces in the output which need removing.
The script appears not to read the output properly if it contains spaces.
Here is the code I am using:
@echo off
md c:\temp
md c:\temp\Reg_Test
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 /v SchUseStrongCrypto > c:\temp\Reg_test\AfterRegUpdate32.log
findstr /v /r /c:"^$" /c:"^\ *$" /c:"^\ *$" "C:\temp\Reg_Test\AfterRegUpdate32.log" >> "C:\temp\Reg_Test\AfterRegUpdate32.txt"
exit
It appears to do everything I need except for deleting the spaces. I know there is something simple I am missing here. Any help will be greatly appreciated.