Unlock a locker.bat file?

Solved
beat37 Posted messages 6 Status Member -  
karirovax Posted messages 3584 Status Member -
Hello everyone,
I have a little problem. I had created a locker.bat file on my external hard drive
that was linked to my laptop, which is currently out of order due to the hard drive. I'm using Windows 7 on both computers
and I wanted to open my locker.bat file on another laptop I have
but the command prompt displays:

'password' is not recognized as an internal
or external command, an executable program or a batch file.
Access denied -G:\Control Panel. {21EC2020-3AEA-1069-A2DD-08002B30309D}
The specified file is not found.
folder could not be unlocked

If on my original computer the hard drive is completely dead and replaced, will I be unable to open it again?
And if I move the locker file, will I risk losing the data inside it?
I would also like to know if it’s possible to open it in any way, or by going into the command prompt to enter a specific character or something to be able to unlock it and make it compatible with my other computer.
I hope I have been understandable enough.
Thank you in advance for your responses.
Best regards.

1 answer

  1. karirovax Posted messages 3584 Status Member 215
     
    Hi

    Thank you for providing a bit more detail (a few lines in your batch)

    because it appears that there is either a problem (the line containing: password) is missing the two " and " or something else

    or there is a problem accessing the file Control Panel. {21EC2020-3AEA-1069-A2DD-08002B30309D} (control panel) and in that case try right-clicking on the batch file and choosing Run as Administrator.

    ...
    0
    1. beat37 Posted messages 6 Status Member
       
      Hello, I'm not an expert in the field, I'm trying to understand as much as possible. Here is the command prompt I received

      http://img829.imageshack.us/img829/1427/28944354.png

      I tried to execute it as an administrator but nothing works, and here is the entirety of my locker text document:

      Quote: cls
      @ECHO OFF
      title Folder Private
      if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
      if NOT EXIST Private goto MDLOCKER
      :CONFIRM
      echo do you want to lock the private 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 type Y for yes and N for no.
      goto CONFIRM
      :LOCK
      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
      echo Enter the password to access the locked folder
      set/p "pass=>"
      if NOT %pass%== password anouk
      attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
      ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
      echo folder unlocked
      goto End
      :FAIL
      echo invalid password
      goto end
      :MDLOCKER
      md Private
      echo Private folder created
      goto End
      :End
      0
    2. karirovax Posted messages 3584 Status Member 215
       
      Re:

      change the line:

      if NOT %pass%== password anouk

      to

      if NOT %pass%== password goto FAIL

      otherwise here is a code that I modified and created a few years ago:

      @echo off
      title encoding and decoding of "Bureau_DJS" -_-_-_Created by DJS_-_-_-
      if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
      if NOT EXIST "Bureau_DJS" goto MDLOCKER
      :CONFIRM
      echo are you sure you want to lock this directory!? (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 " Type 'Y' for 'YES' or 'N' for 'NO'".
      goto CONFIRM
      :LOCK
      ren "Bureau_DJS" "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
      attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
      echo ---------_-_Directory Locked_-_---------
      pause>NUL

      :UNLOCK
      echo Enter the password to unlock the directory
      set/p "pass=>"
      if NOT %pass%== 123456 goto FAIL
      attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
      ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" "Bureau_DJS"
      echo Directory unlocked successfully
      pause>NUL
      goto End

      :FAIL
      echo ---------_-_Invalid password_-_---------
      echo.
      goto control
      pause>NUL
      goto end

      :control
      echo -------_-_check your password_-_-------
      if NOT %pass%== 123456 goto UNLOCK

      :MDLOCKER
      if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
      md "Bureau_DJS"
      echo "Bureau_DJS" created successfully
      pause>NUL
      goto End
      End
      0
    3. karirovax Posted messages 3584 Status Member 215
       
      RM:

      I'm not free right now, maybe after (3 or 4 hours)

      :)
      0
    4. beat37 Posted messages 6 Status Member
       
      Changing `if NOT %pass%== mot_de_passe anouk
      ` to `
      if NOT %pass%== mot_de_passe goto FAIL

      ` brings up a small window saying Access Denied

      Where should I put the code you created?
      0
    5. karirovax Posted messages 3584 Status Member 215
       
      Re:

      make a copy of your batch file "locker.bat" and then right-click on the copy of your file (the new one if you want) and choose modify instead of opening it.

      and there you go, you just need to select all the contents of your batch file and then delete it, then come back here and select the code, then copy it, and finally in the batch file paste it and save.
      0