Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stupid file locking question

Status
Not open for further replies.

blkntan

IS-IT--Management
Nov 6, 2002
8
0
0
US
Trying to lock a batch file to execute only permissions (easy in UNIX)so that the users can execute the batch file but not read or change it. Tried special permissions and allow transverse folder/execute file and deny everything else, but windows adds read permissions after I hit apply. Any ideas?
 
You can add an explicit Deny Write permission to it to stop your users changing the file, but it wouldn't stop them opening the file in Notepad and viewing the contents, so its only a partial solution.

John
 
Unfortunately I want/need to keep them from reading it too.
 
Could you have one batch file which uses RunAs to execute the other batch file as a second user. The primary user accounts need no rights to access the file altogether.

I don't know of any other way in which you could wholly accomplish your task. As batch files are executed within the security context of the user that runs them, the operating system must be able to read the batch file in order to interpret and execute it.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top