bugfixer.bat batch file ask end user which option they want to run

fun stuff!!

Manager has just bought a humdinger of a utility. It does everything. It even has command line functionality. If you run BugFixer /a the application will automatically scan the entire drive for cooties. If you run the Bugfixer /b it will scan all of your files on the Windows\system 32 directory and if you run Bugfixer /c the program will scan and repair your Registry. Need to write a batch file that will allow your users to avoid that pesky GUI and efficiently run the Bug fixer through the command line, by asking them which option they would like to initialize.

:TOP 
ECHO WHICH BUG FIXER DO YOU NEED TO RUN? A=ALL B=SOME c=REPAIR 
SET /P = %USERSPEC% 
IF "%1"=="A=ALL" GO TO :FIRST 
IF "%1"=="A=all" GO TO :FIRST 
:FIRST
CHKDSK C:
ECHO CHECKING ALL FILES ARE COMPLETE 
IF "%2"=="B=SOME" GO TO :NEXT
IF "%2"=="b=some" GO TO :NEXT 
:NEXT 
CHKDSK /F /R C:\WINDOWS/SYSTEM32 
ECHO CHECKING SOME FILES ARE COMPLETE 
IF "%3"=="REPAIR" GO TO :LAST 
IF "%3"=="repair" GO TO :LAST 
:LAST
CHKDSK /c 
ECHO REPAIR FILES ARE COMPLETED

Like I said fun stuff. Anyone wanna help?

Answers


Next script logic could become helpful:

@echo OFF >NUL
setlocal enableextensions
:TOP
echo(
set "USERSPEC="
set /P "USERSPEC=Which bug fixer do you need to run? A=all B=some C=repair? "
if /I "%USERSPEC%"=="A" goto :FIRST 
if /I "%USERSPEC%"=="B" goto :NEXT  
if /I "%USERSPEC%"=="C" goto :LAST
echo NO CHECK CHOOSEN, BATCH ENDS
goto :ENDSCRIPT

:FIRST
chkdsk C:
echo CHECKING ALL FILES ARE COMPLETE 
goto :TOP

:NEXT 
chkdsk /F /R C:\WINDOWS/SYSTEM32 
echo CHECKING SOME FILES ARE COMPLETE 
goto :TOP

:LAST
chkdsk /c 
echo REPAIR FILES ARE COMPLETED
goto :TOP

:ENDSCRIPT
endlocal
goto :eof

However, running it:

==>30019117.bat

Which bug fixer do you need to run? A=all B=some C=repair? a
Access Denied as you do not have sufficient privileges.
You have to invoke this utility running in elevated mode.
CHECKING ALL FILES ARE COMPLETE

Which bug fixer do you need to run? A=all B=some C=repair?
NO CHECK CHOOSEN, BATCH ENDS

==>

Resources (advised reading):


Need Your Help

App stops working with signed APK playstore version but does work from the compiled one from Android Studio

android android-studio google-play-services proguard

When I login in the timetable page, from the version downloaded from android studio onto my phone, it works fine and takes me to the timetable. However when I try login in the timetable page from the

setting scrollbar in tkinter tree widget python

python tkinter treeview

i am developing a small GUI application in tkinter python and i want to set horizontal and vertical scroll bars to a tree widget (only to tree widget not to main master window).but when i am trying...