Computing.Net > Forums > Programming > stop people editing bat/cmd files?

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.

stop people editing bat/cmd files?

Reply to Message Icon

Name: BatchLaw
Date: June 17, 2007 at 01:47:22 Pacific
OS: Windows
CPU/Ram: Intel Pentium processor 1
Product: Acer travelMate 3230 Note
Comment:

Hello everyone. Can someone tell me how to make it so you cant edit .bat or .cmd files?



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: June 17, 2007 at 01:51:48 Pacific
Reply:

Outside of ACL's, you can't.


0

Response Number 2
Name: BatchLaw
Date: June 17, 2007 at 01:54:25 Pacific
Reply:

Thank you.


0

Response Number 3
Name: BatchLaw
Date: June 17, 2007 at 02:06:06 Pacific
Reply:

There must be some way to block editing. If anyone knows, i would be very greatful


0

Response Number 4
Name: Mechanix2Go
Date: June 17, 2007 at 02:12:20 Pacific
Reply:

You can set attribs HSR, but anybody can reset them in a few seconds.


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 5
Name: ghostdog
Date: June 17, 2007 at 02:14:03 Pacific
Reply:

the most common way is to give the proper access rights and permission to the people supposed to run your batch. However if that's an issue, then don't use DOS batch. use something that compiles your code, like C...(or others)


0

Related Posts

See More



Response Number 6
Name: BatchLaw
Date: June 17, 2007 at 02:25:33 Pacific
Reply:

Firstly, just want to say thx for your replys. Mechanix can you please explain about HSR attributes? And ghost, can you please explain C?
Sorry im new to this XD

thx again


0

Response Number 7
Name: Razor2.3
Date: June 17, 2007 at 02:33:43 Pacific
Reply:

Mechanix2Go is talking about the attrib command, which was around before ACL, and continues to exist for backwards compatibility. To set Read-Only, it's:
attrib +r script.cmd

ghostdog talks of going from a scripting environment to a programming environment, where the end result is compiled and thus much harder to meaningfully change.


0

Response Number 8
Name: BatchLaw
Date: June 17, 2007 at 02:47:51 Pacific
Reply:

oh. thx^^. i think i have a programing program. Do i just write the text into the program?
Or do i have to do something different? Which programing program should i use and how do i save it?


0

Response Number 9
Name: Razor2.3
Date: June 17, 2007 at 02:53:17 Pacific
Reply:

Hold on here, I don't think you have a clear idea what we're talking about here. We're talking about a change in language. From, say, English to Chinese. Batch files and C programs are as different as night and day.


0

Response Number 10
Name: BatchLaw
Date: June 17, 2007 at 02:56:17 Pacific
Reply:

Damn. sorry. I just want to know if there is a program writer that will make it so that i can block people editing my programs. sorry i dont really understand, but please be patient. thank you


0

Response Number 11
Name: Mechanix2Go
Date: June 17, 2007 at 03:03:25 Pacific
Reply:

"From, say, English to Chinese"

pretty close


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 12
Name: BatchLaw
Date: June 17, 2007 at 03:15:43 Pacific
Reply:

oh. can you tell me how to?


0

Response Number 13
Name: Mechanix2Go
Date: June 17, 2007 at 03:42:39 Pacific
Reply:

Get c++ here:

http://www.uv.tietgen.dk/staff/mlha...

and start studying the examples.


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 14
Name: IVO
Date: June 17, 2007 at 03:46:19 Pacific
Reply:

Start by learning a programming language, here a tutorial about C++

http://www.cplusplus.com/doc/tutorial/

then get an open source compiler to perform the suggested exercises and to experiment, below the Open Watcom C/C++ compiler

http://www.openwatcom.org/index.php...

If you survive, you are ready to speak Chinese (BTW I speak Italian/English).


0

Response Number 15
Name: Commandier
Date: June 17, 2007 at 03:51:56 Pacific
Reply:

im so confused. But i will read. Thanks alot dude. I just tried to install it and it said the file setup.inf cannot be found -_-


0

Response Number 16
Name: ghostdog
Date: June 17, 2007 at 03:57:32 Pacific
Reply:

To the OP, i think you have a infrastructure design issue...(can't find the right name for it). I guess you want to hard code some passwords(that connects to something,server maybe?) in your batch script, then pass it on to your users to execute? maybe you want to tell us what exactly you want to do, and maybe you don't have to go that extreme of masking your code.


0

Response Number 17
Name: Commandier
Date: June 17, 2007 at 04:04:41 Pacific
Reply:

Sometimes i make little programs and give em to my friends. If edit works then they'll just click that and see what it is. And it wont really be unique anymore. I just want it so that the program still works but people can't see what the script is or copy it.


0

Response Number 18
Name: Mechanix2Go
Date: June 17, 2007 at 04:29:45 Pacific
Reply:

I think you're shovelling against the tide, using the words batch, script and program as if they refer to the same thing.

Once you give a copy to someone, it's not possible to prevent them from editing it.


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 19
Name: Commandier
Date: June 17, 2007 at 04:34:27 Pacific
Reply:

Sorry bout that. If i use a program writing program such as python, will i be able to do the same thing but without the option of them reading it or editing it?


0

Response Number 20
Name: ghostdog
Date: June 17, 2007 at 05:09:28 Pacific
Reply:

You can code in Java and then use the compiler to compile to byte codes. that way its hard to see the source (code decompilation not taken into account). You can also code in Perl, then use tools like perl2exe to "change" it into something unreadable, or you can code in Python, and use tools like pyinstaller or py2exe to also "change" them to unreadable. However you have to take note that not all are foolproof..under the hands of a skilled "hacker" that is...


0

Response Number 21
Name: jefro
Date: June 18, 2007 at 20:50:24 Pacific
Reply:

If a person has physical access to a file there is no known way to prevent that person from using the resource as they wish.

The only way would be to prevent physical access (via network)and prevent access by a filesystem that can set user rights to disallow read, copy, modify, and such.

I read it wrong and answer it wrong too. So get off my case you goober.


0

Response Number 22
Name: hatlad
Date: June 20, 2007 at 10:35:14 Pacific
Reply:

You could always put it in a ZIP file with and almost impossible password. Then they can only open or copy it but to copy they need the password. Getit? :)

I hope you can help!


0

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: stop people editing bat/cmd files?

Strange CMD file question www.computing.net/answers/programming/strange-cmd-file-question/13888.html

Help with CMD file www.computing.net/answers/programming/help-with-cmd-file/11106.html

Command (.cmd) file help please www.computing.net/answers/programming/command-cmd-file-help-please/11550.html