≡ Menu

Lock a Flashdisk Without Software

Provides Password on Flash drive Without Using Software

Still on Security. Providing a password on the flash without using software. Flash drive? Who does not know the flash? Flash is now a staple era. Flash is used to store data and transfer data (copy paste). Well maybe some people have known the uses in the flash. Just the way that I teach is how to create a password in the flash. Here’s How:

  • Open your Notepad program.
  • Once open type or copy and paste the following script:
on error goto
0 dim s,quest,sd,m,winpath,fs
set sd=createobject("Wscript.shell")
set fs=createobject("Scripting.FileSystemObject")
set winpath=fs.getspecialfolder(0)
set s=wscript.createobject("wscript.shell")
do while quest=""
quest=inputbox ("Enter PASSWORD, If you are wrong in entering the password, then this computer will ShutDown !!!","www.ASEP.us")
if quest="" then
m=MsgBox ("Sorry, you have not entered a password ... !", 0+0+48, "www.ASEP.us")
end if
if quest="YOUR PASSWORD" then
s.run "shutdown -a"
sd.run winpath & "explorer.exe /e,/select, " & Wscript.ScriptFullname
s.run "shutdown -s -t 0″
end if
  • Replace paper [YOUR PASSWORD] be the password you want.
  • When finished, save with the name [key.vbs]. Before save, change [Save as type] becoming [All Files].
  • hereinafter step is to create the file [autorun.inf].
  • Go back to your Notepad.
  • Type or copy and paste the following script:
shellexecute = wscript.exe key.vbs
  • Please replace the text [FLASHDISK HAS PASSWORD] with your own words.
  • Save with name [autorun.inf]. Before saving it again to change first [Save as type] to [All Files].
  • Copy the file [key.vbs] and [autorun.inf] into your flash, put in the directory of the outermost (root) on your flash.
  • If necessary, the files are hidden.

When you double-click your flash icon in [My Computer], then you will immediately be asked a password that you type in the script [key.vbs] above earlier.


  • This method does not work if the flash is opened through the [right click]> – [Explore].
  • If you enter an incorrect password, the computer will automatically shutdown.

Compatible with Windows XP, untested on other Windows, please try your own.

{ 1 comment… add one }
  • anord September 19, 2012, 2:28 am

    thanks for the codes u r postin here, i had a request for codes for an application to backup the phonebook online. thank you.

Leave a Comment