Prevent Batch file edits

  dalek111 22:03 20 Jan 2009


I would be grateful if anyone could tell me if there is any way to stop a batch files code being edited, while allowing the code to run. I know that this is possible without use of user account policies or restrictions. Thanks in advance

  MAJ 22:15 20 Jan 2009

A batch file compiler? click here

  Switcher 22:17 20 Jan 2009

In command prompt type attrib filename.bat R

  MAJ 22:26 20 Jan 2009

Or stick "bat to exe" into Google.

  dalek111 22:29 20 Jan 2009

Switcher: Thanks for replying. I tried what you said and got this...

D:\>attrib test.bat R
Parameter format not correct -

Any ideas?

  Switcher 22:32 20 Jan 2009

Giving the file the attribute R will make it read only. You could also give H to make it hidden and S to make it a system file. i.e Attrib x.bat SHR
To remove attrib so that you can edit it use -R

  dalek111 22:34 20 Jan 2009

Switcher: Thanks but is going to be too easy to get round. I'm looking at the link provided by MJA (thanks for that by the way), and its looking promising. I'll get bact to you

Thanks for your posts

  dalek111 22:37 20 Jan 2009

Yeah, that program looks good. Do you know if there is a similer total freeware program available?

  Switcher 22:40 20 Jan 2009

Sorry getting rusty should be Attrib +r :\test.bat
assuming file is in root directory of d:

  Switcher 22:42 20 Jan 2009

Mistakes again attrib +r d:\test.bat will make it read only

  MAJ 22:42 20 Jan 2009

That was my second post, dalek

"Or stick "bat to exe" into Google"

there's a few of them there but I didn't get time to look through them.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Dell XPS 13 9370 (2018) review

Creative studio Omnibus' brand identity for We Said Enough fights back against sexual misconduct

WWDC history: Apple's product launches since 2005

Espace de stockage : comment libérer de la mémoire sur votre iPhone ?