Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrapping a BATCH file with password.

Status
Not open for further replies.

vrcatherine

IS-IT--Management
Feb 2, 2003
215
US
Is there a way i can wrap a .bat file with password.


I have written some batch files to run on the client
machines.

I dont want anyone else to see the content of the .bat files except me.

Like if someone is trying to open the .bat file it
should ask for a password.


Other than that if someone double-clicks it should
run normally.


 
Just an idea for a work-around, you can use ntfs permissions to make it a read-only file for other users, only full control for yourself...
I don't know if that's acceptable for what you're trying to do, it was just the first idea that came to me.

Paintballer
 
Thanks for the reply.

Basically I am trying to write some scripts in
BATCH files and put them into a folder.

I will be copying this folder onto some client
computers which are in a remote place.

I dont want any of them to open this folder
and check what is in this batch files.

Basically I wanted to protect my code which
is written in the batch files.


 
If you can read a file you can see what is in it.

Under W2k NTFS I think you can seperate read and execute, but have never tried it.

Batch files can be secured to a certain extent by using parameters so that they are not run by accident. If you really need to completely "hide" the contents then run similar commands from within a VB app. Perl is useful too, but do not think you can hide it either

Sorry no better news

AJ
 
Basically the end user should be able to run execute
the batchfile but NOT READ /WRITE ..
 
You could try using a product like AutoIt which takes a script language (similar to batch language) and makes and exe out of it
 
Using NTFS permissions will allow you to set execute permission without read/write permissions. This will allow the user to to run the batch file, but not open it to see its contents.
 


Is there a way i can make a .EXE of all the
files (batch file, text files which the batch file calls)

So when the end user click the .EXE it will run
the command in my batchfile & sql files ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top