Prevent editing in a batch?

April 8, 2011 at 21:00:46
Specs: Windows 7
I want to prevent editing to a batch... Like maybe have a password lock thing but I still want to be able to edit it just only me so thats why I want the password lock. But I don't know how to make one.

See More: Prevent editing in a batch?

Report •

April 8, 2011 at 21:52:34
By the way what I'm really asking is a way to allow me to edit it but no one should be able to edit it but they should be able to run it.

Report •

April 8, 2011 at 22:08:01
Perhaps you could use file permissions (i.e read and execute only).

It won't stop the users from copying the text into a new script, editing and running that though.

Report •

April 9, 2011 at 02:07:29
As far as I'm aware, there's no way to Password protect a file as such, however what you COULD do, if you have access to other applications such as VB6, is make an executable to write a batch file as hidden/read only, and run it. That way your program writes the batch file, runs it and deletes it. Nobody sees the batch file. Only you can edit the VB6 Code because it's compile and hidden by the time other people can access it. Make sure you change the Attributes before you delete it though, from vbHidden to vbNormal, then you can use Kill to delete it.

Otherwise mate, I can't help - sorry. Was just throwing another language at you.

Report •

Related Solutions

April 9, 2011 at 10:31:10
Well I don't know how to do the permissions so can you tell me. cause like I said I want people to run it only... nothing else... just running it

Report •

April 9, 2011 at 16:45:28
I'm on xp so the process may be different in win7, but I'm guessing that you should be able to right click on the file and deal with permissions from there.

If cacls hasn't been changed then the command line:cacls filename /g username:R

For each subsequent used add the "/e" switch after the filename.

Report •

Ask Question