Windows file permissions

  • Thread starter Thread starter caserc
  • Start date Start date
C

caserc

I wrote a batch file for a user and would like for him to be able to
execute it without having the ability to edit it and see the syntax.
Is this possible, or do you have to have read rights to execute? I
can write this set of commands into a web or windows app and get the
result I want, I was just wondering if there was an easier way.

Thanks!
 
Hi,

Interesting problem. Just for fun, I just created a small batch file
using Notepad. I then edited it and changed the font to something
unintelligible (I used Wingdings as a test). By Jove, the file still
worked with the wonky font.
 
Claymore said:
Hi,

Interesting problem. Just for fun, I just created a small batch file
using Notepad. I then edited it and changed the font to something
unintelligible (I used Wingdings as a test). By Jove, the file still
worked with the wonky font.

When you assign a font in Notepad, Notepad uses that font to view the
text, it makes no change in the text itself. In fact, it will show any
file in the font you've selected until you change it back.

If you right-click a file in Windows Explorer, then choose Properties,
then click the "Security" tab (this may apply only in Pro), you can
assign permissions to the users on your computer. There's "read" and
"read and execute", but no "execute, but don't read". So you're
probably stuck.
 
Claymore said:
Hi,

Interesting problem. Just for fun, I just created a small batch file
using Notepad. I then edited it and changed the font to something
unintelligible (I used Wingdings as a test). By Jove, the file still
worked with the wonky font.

Why shouldn't it? Drop to the command prompt and issue

type xxxxxxxx.bat

and view the result.
 
Thanks for the ideas - I hadn't thought of changing the font. The
problem is this user is pretty technical (which is why I don't want
him looking at the syntax in the first place - minor changes and he
could do a lot more than I want him to) so I'm sure he'd change his
font back the first time he opened a file in notepad.

As for the rights, I actually tried denying myself "read" and "write"
and allowing "read and execute", before posting the first time, but
was unable to execute. I didn't get permission denied, but the
statements inside the file didn't run. (For added fun, I was unable
to un-deny those things because I no longer had the permission :)

I can't think of any way around having to actually write a web or
windows application, but I figured it was worth asking since I don't
even have Visual Studio installed at the moment :(
 
Back
Top