More .bat Help please

Messages
45
I also need help with this bath file

How do i get a user to enter the password "DDAF" to start the "chkdsk" command?
and if the user enters a wrong password I want them to be dispalyed with a Wrong Password Message and "pause" then taken to :start


@echo off
:start
title GDAY!
color 3A
set /p name=HELLO WHATS YOUR VIEW ON THE WORLD TODAY?
echo %name%
echo The Local Time (As set in your BIOS)
time /t
date /t
pause
echo Please tell me what you think of this basic system checking tool.
pause
cls
echo Select Your Tool
choice /c:1234567 /m "1=Shutdown Computer 2=Convert FAT Drive to NTFS 3=Check Your Bootstrap Loader (Boot Sector) 4=Tasklist 5=Test Copy 6=Start Over 7=End Job"
if errorlevlel 7 goto end
if errorlevel 6 goto six
if errorlevel 5 goto five
if errorlevel 4 goto four
if errorlevel 3 goto three
if errorlevel 2 goto two
if errorlevel 1 goto one
:eek:ne
echo Please comfirm shutdown (Press ENTER)
pause
goto shutdown
:shutdown
cls
set /p sec=Enter The Amount Of Seconds Berfore Shutdown
shutdown -s -f -t %sec% -c Seya
echo Shutdown Initiated at %time%
set /p stop=To cancel shut down type STOP
if %stop%==stop shutdown -a
if %stop%==stop goto start
:two
convert c:
pause
cls
goto start
:three

(NOT PART OF BATCH FILE, ENTERED ON FORUM)

set /p DDAF=Enter Password (Password Is Not Masked)
if %DDAF% goto threestart


:threestart
set /p drive=Enter Drive Letter (Don't Forget The :!!)
echo You Selected Drive %drive%
chkntfs %drive%
pause
cls
goto start
:four
tasklist
pause
cls
goto start
:five
copy c:\windows\system32\hal.dll c:\
pause
cls
goto start
:six
goto start
:end
 
How about something like this:

@echo off
:start
cls
set /p PW=Enter Password (Password Is Not Masked)
IF %PW%==mypassword goto threestart
echo "Wrong password!"
pause
goto start
:threestart
echo "Right password!"
pause
 
Back
Top Bottom