Just tested this on my computer and when it ran through this step, the entries in the file "programs_to_target_by_name.txt" that contain spaces are considered only to be the first item. The syntax
for /f %%i in (filename) do ( echo %%i )
only echos the first word of the line. Using
for /f "tokens=*" %%i in (filename) do ( echo %%i )
captures the whole line, but this does not allow to test the beginning of the line for your :: and set cases as they stand. You can echo the variable and pipe that to findstr and see if it contains the :: or set, perhaps
Ran into this as an issue because when testing for "AVG PC TuneUp%%" it began to uninstall "AVG" as that was the match it found, and corrupted the install, with the computer/AVG forcing a reboot
Just tested this on my computer and when it ran through this step, the entries in the file "programs_to_target_by_name.txt" that contain spaces are considered only to be the first item. The syntax
for /f %%i in (filename) do ( echo %%i )
only echos the first word of the line. Usingfor /f "tokens=*" %%i in (filename) do ( echo %%i )
captures the whole line, but this does not allow to test the beginning of the line for your :: and set cases as they stand. You can echo the variable and pipe that to findstr and see if it contains the :: or set, perhapsRan into this as an issue because when testing for "AVG PC TuneUp%%" it began to uninstall "AVG" as that was the match it found, and corrupted the install, with the computer/AVG forcing a reboot