Computing.Net > Forums > Programming > Batch Programming

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch Programming

Reply to Message Icon

Name: BJseal91
Date: March 7, 2009 at 02:02:49 Pacific
OS: Windows XP
CPU/Ram: 256MB
Subcategory: Batch
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: lee123abc
Date: March 7, 2009 at 10:21:59 Pacific
Reply:

have you thought about converting it to an .exe file?


0

Response Number 2
Name: BJseal91
Date: March 8, 2009 at 06:14:34 Pacific
Reply:

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


0

Response Number 3
Name: lee123abc
Date: March 8, 2009 at 15:45:56 Pacific
Reply:

Sorry, I don't have any other suggestions mate. Hope the experts can help you.

Cheers


0

Response Number 4
Name: Judago
Date: March 8, 2009 at 16:24:33 Pacific
Reply:

If you are on xp pro you may be able to set file permissions as read and execute.

http://support.microsoft.com/kb/308419


0

Response Number 5
Name: MikeKozar
Date: June 3, 2009 at 14:59:07 Pacific
Reply:

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 vandal

All 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.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch Programming

Advanced batch program www.computing.net/answers/programming/advanced-batch-program/14439.html

Batch Programming www.computing.net/answers/programming/batch-programming/3213.html

Batch Programming www.computing.net/answers/programming/batch-programming/15718.html