- Thread Author
- #1
Hi guys I know I am a newbie here but I am no newbie to tech. However there is a problem I have been having recently and I can't seem to beat it lol and it's irritating me! So I was wondering if you could help me solve my dilema.
See I use a batch file on my USB that protects it (From un-geek people) But it is easily gotten through if you know how to. Now I have already solved one or two flaws. I converted the batch to an exe so you can't get the password and I also put the i attribute in as well. But I cannot figure out how to make a batch file that changes the permissions on the folder so that when it is unlocked everyone has full control but when it is locked NO ONE can access it. (I am happy to know that the only flaw with this is changing the folders permissions manually) See my USB is full of extremely confidential stuff. So if anyone could get me on my way with this?
Also please don't suggest any sort of program to replace this as I am not allowed to use encryption programs in the workplace. Just batch files or exe files.
So can anyone help? here is the current script I am using.
See I use a batch file on my USB that protects it (From un-geek people) But it is easily gotten through if you know how to. Now I have already solved one or two flaws. I converted the batch to an exe so you can't get the password and I also put the i attribute in as well. But I cannot figure out how to make a batch file that changes the permissions on the folder so that when it is unlocked everyone has full control but when it is locked NO ONE can access it. (I am happy to know that the only flaw with this is changing the folders permissions manually) See my USB is full of extremely confidential stuff. So if anyone could get me on my way with this?
Also please don't suggest any sort of program to replace this as I am not allowed to use encryption programs in the workplace. Just batch files or exe files.
So can anyone help? here is the current script I am using.
Code:
cls @ECHO OFF
title Folder USBHDD
if EXIST "Hidden Folder" goto UNLOCK
if NOT EXIST USBHDD goto MDLOCKER
:CONFIRM
echo Lock and encrypt USB?
set/p "cho=>"
if %cho%==y goto LOCK
if %cho%==Activate goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Incorrect Choice. Try Again.
goto CONFIRM
:LOCK
ren USBHDD "Hidden Folder"
attrib +h +s +i "Hidden Folder"
echo Folder Hidden
goto End
:UNLOCK
echo Access is requested. Type the Master Control Code
set/p "pass=>"
if NOT %pass%== bypasssecurityprotocol goto FAIL
attrib -s -h -i "Hidden Folder"
ren "Hidden Folder" USBHDD
echo Access Granted
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md USBHDD
echo USBHDD created successfully
goto End
:End