I need this script to run the commands when the specific number is typed, but only the first command works.
Whenever I enter a number that is not one, it immediately just clears the screen and restarts the script.
Here is the code:
@echo off
:optimizer
color F0
echo Welcome to Bug-Blitz!
echo.
echo 1 [Fix Registry Errors (It will take a few seconds)]
echo.
echo 2 [Storage Cleanup]
echo.
echo 3 [Refresh IP (It will take a few seconds)]
echo.
echo 4 [Restart System]
set /p tweaks=Enter a number from above:
if %tweaks% == 1 DISM /Online /Cleanup-Image /CheckHealth
cls
goto optimizer
if %tweaks% == 2 del C:\Windows\prefetch\*.*/s/q
pause
cls
goto optimizer
if %tweaks% == 3 ipconfig /release && ipconfig /renew
pause
cls
goto optimizer
if %tweaks% == 4 shutdown /r
pause
cls
echo Your computer will restart in a few moments...
pause
exit
I tried to run the program using admin mode but it still won't work. I even tried a VM but it still wouldn't work.
How do I fix this problem? Anyone has any idea or way?