Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cls
- @ECHO OFF & setlocal DisableDelayedExpansion
- set counter=4
- title Folder Private
- if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
- if NOT EXIST Private goto MDLOCKER
- :CONFIRM
- echo Are you sure you want to lock the folder(Y/N)
- set/p "cho=>"
- if %cho%==Y goto LOCK
- if %cho%==y goto LOCK
- if %cho%==n goto END
- if %cho%==N goto END
- echo Invalid choice.
- goto CONFIRM
- :LOCK
- taskkill /FI "IMAGENAME eq explorer.exe" /FI "WINDOWTITLE eq FolderName*"
- ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
- attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
- echo Folder locked
- goto End
- :UNLOCK
- if %counter% equ 0 goto End
- Mode 50, 30 & color 0e
- echo Enter Password to access inside
- set /p "input=>Username:"
- set "psCommand=powershell -Command "$pword = read-host 'Enter password' -AsSecureString ; ^
- $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^
- [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)""
- for /f "usebackq delims=" %%p in (`%psCommand%`) do set password=%%p
- )
- if NOT %input%==your_username_here goto FAIL (
- if NOT %password%==password_here goto FAIL
- )
- attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
- ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
- echo Folder Unlocked successfully
- %SystemRoot%\explorer.exe "Folder_directory"
- goto End
- :FAIL
- echo.
- set /a counter -=1
- echo.
- @echo on
- @echo off
- color a0
- echo INCORRECT USERNAME OR PASSWORD
- echo.
- if %counter% lss 4 echo %counter% attempts left
- pause
- goto :UNLOCK
- :MDLOCKER
- md Private
- echo Private created successfully
- goto End
- :End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement