Password for bat Access!!

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jamesfui
Posts: 50
Joined: 27 Mar 2010 23:00

Password for bat Access!!

#1 Post by jamesfui » 03 Apr 2010 06:17

hi every batch scripters,
i have a secret.bat & like to have password protection in it
so that whenever the bat need to run, it will prompt the user
to input the correct access passcode.
if passcode is correct, proceed & run!
but if wrong, access denied & show message 'passcode wrong, please try again & exit'

thanks!! 8)

fanwars
Posts: 1
Joined: 05 Apr 2010 02:34

Re: Password for bat Access!!

#2 Post by fanwars » 05 Apr 2010 02:39

Why?

Although the bat was succesfully password protected,
it would be easy to crack the protection away... :|

phillid
Posts: 109
Joined: 03 Apr 2010 20:27
Location: Wellington, New Zealand
Contact:

Re: Password for bat Access!!

#3 Post by phillid » 05 Apr 2010 20:05

You could do a piece of code something like:

set /P %password% = "Please enter the password:"
if %password% == your_password (
echo Password correct!
[your code]
) else (
echo Password incorrect!
exit /B
)

This would be easily hacked by opening the batch file for editing unless you download a program called BAT to EXE converter (http://www.brothersoft.com/downloads/bat-to-exe-converter.html) and convert your batch file. After conversion, there will be a *.EXE file and a *.BAT. The EXE will not be readable if opened in a text editor. There might be a few bits of software out there but you might be able to use your password program to stop people from using the floppy drive or something so they can't install anything like that. This will probably be very secure for average users. Give it a try and tell us how it goes!

jamesfui
Posts: 50
Joined: 27 Mar 2010 23:00

Re: Password for bat Access!!

#4 Post by jamesfui » 06 Apr 2010 02:52

thanks for the bat2exe info..
is a very good & friendly applications!!

i love it but how to you use the decompiler feature?
i only know how to set for its icon & version description..
the ADD part in the second tab what is it use for?
thanks! :D

ENU_USER*.*
Posts: 5
Joined: 10 Jan 2010 14:57
Location: U.S FL.

Re: Password for bat Access!!

#5 Post by ENU_USER*.* » 07 Apr 2010 07:36

Jamesfui... I personally like to use Quick Batch File Compiler Standalone
which is a lot more user friendler and since its a standalone does not need
to be installed, and if you work with .vbs you can also use ScriptCryptor Compiler
that will also convert to .exe and allow you to use your own custom icon
to give your .bat or .cmd a more professional look.BTW can you share the code
you used in your bat file to created your p/w protected script to the group.
:twisted:

phillid
Posts: 109
Joined: 03 Apr 2010 20:27
Location: Wellington, New Zealand
Contact:

Re: Password for bat Access!!

#6 Post by phillid » 07 Apr 2010 20:03

I am using one of the first versions of Bat to Exe converter. It doesn't have a decompiler feature, does the latest version? It's standalone so it doesn't require any installation, it just comes with a .exe and a .hlp. In my version of it, The ADD function just lets you have extra information in the EXE like the version, copyright, publisher and all that other stuff. I think this can only be seen in windows, because DOS wasn't made to have fancy things like that. You don't absolutely need to put anything in there, but just in case someone somehow copies your program, you should put a copyright and a company in there. If you don't own a company, just put your first and last name.
Hope I helped! :D

phillid
Posts: 109
Joined: 03 Apr 2010 20:27
Location: Wellington, New Zealand
Contact:

Re: Password for bat Access!!

#7 Post by phillid » 07 Apr 2010 20:15

Oh! I just realised!!! anybody who has access to your computer could simply press 'up' on the key board and see what you just typed in! There must be a way to delete what you have typed in...
:?

---saster---
Posts: 5
Joined: 07 Apr 2010 06:49

Re: Password for bat Access!!

#8 Post by ---saster--- » 08 Apr 2010 02:27

that´s doskey

doskey remember the commands that you use

press [ALT+F7] to delete the command list & press [F7] to see all the commands that you write

phillid
Posts: 109
Joined: 03 Apr 2010 20:27
Location: Wellington, New Zealand
Contact:

Re: Password for bat Access!!

#9 Post by phillid » 09 Apr 2010 19:16

OH! Cool! Thanks. All this password stuff has inspired me to make my own script. I've always wondered what DOSKEY did. But now that I know, it's really good!
PS: You can download and try the script from http://www.en-gin.ueuo.com/passwordscript/
The password is MSDOS. It is case sensitive.

Post Reply