Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi I need your help I have finished a batch file that I made but now need to know how to stop it from being edited so all the menu states when you right click on the batch file is run E.C.T but not edit so people can not edit the information inside the batch file hope you can help many thanks Bradley

Hi yes I have thought of doing that but I do not now how to convert it to a .exe and get it to work because if you write the batch file coding which I have and save it as .exe it dose not run thanks for getting back to me do you have any ideas what I could do many thanks Bradley

Removing Edit from the right-click menu is a permissions
issue. Probably shouldn't be done to secure a single batch
file, but if your users are that problematic you might consider
a security overhaul.Most anti-tampering that can be done to or within a batch file
can be circumvented by someone with enough understanding
of batch files. This kind of security would stop casual
vandalism, but not any serious attempts to break it. If you
need to secure it absolutely, you should probably be using
something that is harder to edit then batch files.With all that said, here are a few ways to make it harder:
*Set the file to read-only.
*Set the batch to check to see if it still has the read-only
attribute at runtime.
*Set the batch to check and see if the filesize or last save
date implies tampering.
*Set the batch to restore itself from a backup if tampering is
detected.
*Hide the batch file and give users a shortcut link instead.
*Use an internal Call to redirect to a different batch file in a
hidden directory.
*Obscure the internal workings via intentional spaghetti code.
*Add a logging function that appends runtime and current user
to a text file somewhere to help you track the vandalAll of these are kid stuff, but that's about what you can do
with securing a batch file internally. Your best bet is probably
the shortcut - that will keep casual users from getting the
option to Edit from a rightclick.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |