So here is my code
wmic product get name > "programs.txt"
FOR /f %%a IN (programs.txt) DO (
pause
echo %%a
set /p variable= Delete %%a?
pause
IF "%variable%" == "yes" (
wmic product where name="%%a" call uninstall
cls
) ELSE (
cls
)
)
I am trying to make a program where it will display the installed programs and ask if they want to uninstall them. The code runs fine up to the for loop but then it just quits. I tried it with @echo on and it just outputs the code but doesn't run it. any help would be great
[EDIT] Just to explain a bit more when I run the code everything runs fine up till the for loop and then it gets messed up. It won't even run the pause after the for loop it just ends.