bmrf / tron

Tron
https://old.reddit.com/r/TronScript
MIT License
4.85k stars 354 forks source link

Debloat Step does not account for spaces in the names of programs to remove #119

Closed contra1337 closed 6 years ago

contra1337 commented 6 years ago

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

vocatus commented 6 years ago

Thanks for reporting @contra1337, I'll take a look