
Originally Posted by
ThatPurpleNigga
Hey TPN 
A few people are asking about password protect so I figured you could add this in
. I'm not like you, I can't explain shit but I will try ,you will get the jest and you can explain. lol
So here is a basic understanding,
CLS:Clear Screen
@echo off:Show no "User Says"
title: Name of the Command Prompt
Set: Obviously set
passWord:A random string, Can be anything as long as you keep it the same.
Where set passWord=NGUThereThatGuy NGUThereThatGuy is the password.
goto CHECK:Where to go after passWord has been set.
So, Just place your code in the top of the batch file..
Code 1:
Code:
cls
@echo off
title TTG'S Opener
set passWord=NGUThereThatGuy
goto CHECK
:CHECK:Random string, Where from the "goto CHECK" from the previous statement.
%USERNAME%: Pulls the current user logged on name.
set /p pass: This is your string, You can change the "pass" to something els but the /p must remain for this to work.
="Password=>" Is the text that would be displayed

if "%pass%"=="%passWord%" This is saying if the string "pass" is = to the original string "passWord" open the document/info, Or if wrong password go to error page.
So part 2: Can be place anywhere together.
Code:
:CHECK
echo Sup %USERNAME%:
set /p pass="Password=> "
if "%pass%"=="%passWord%" (GOTO OPEN) else GOTO ERROR
:ERROR: A random string that is referring to the above coding.
Rest is the same.
So this would be the error page: 
Code:
:ERROR
cls
echo Wrong password %USERNAME%, Try it again?
set /p pass="Password=> "
if "%pass%"=="%passWord%" (GOTO OPEN) else GOTO END
:OPEN: Refers to the code 2 where to go if
passWord was correct.
cmd /c "info to goto/doc to open"
So here is what this bit would look like this.

Code 3:
Code:
:OPEN
cls
echo Right Password...
cmd /c "C:\Users\%USERNAME%\Desktop\win.txt"
goto END
Just a statement to close the batch command if wrong password is typed in
After the command/doc is closed you get this

Code:
:END
cls
echo closing...
pause
Final complete code
Code:
cls
@echo off
title TTG'S Opener
set passWord=TTG
goto CHECK
:CHECK
echo Sup %USERNAME%:
set /p pass="Password=> "
if "%pass%"=="%passWord%" (GOTO OPEN) else GOTO ERROR
:ERROR
cls
echo Wrong password %USERNAME%, Try it again?
set /p pass="Password=> "
if "%pass%"=="%passWord%" (GOTO OPEN) else GOTO END
:OPEN
cls
echo Right Password...
cmd /c "C:\Users\%USERNAME%\Desktop\win.txt"
goto END
:END
cls
echo closing...
pause
Hope it helped you all out