Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Batch File Help


  • Please log in to reply

#1
gladdie

gladdie

    New Member

  • Member
  • Pip
  • 6 posts
Hi,

I am currently running on win2k and need to write a batch file that can change the inherit permisson of files and folder. For example, i created a new folder name "ABC" in "C:\My Documents\work\mywork". By default, the folder "ABC" would inherit the permission of "mywork". But i need to make "ABC" to inhert the root permission(great grandparents) instead of its parents permission. Meaning that the folder/files will inhert the permission from the root instead of the parents.
I've never written a batch file before so any help or sample that can aid me will be greatly appricated.

Thanks,
Gladdie :tazz:
  • 0

Advertisements


#2
scicatur

scicatur

    Member

  • Member
  • PipPip
  • 16 posts
I think you cannot just jump over the parents and inherit directly from the GrandParents you know.. It's against the law :tazz: Children inherit always from their parents. haha..

But seriously, you just look up what the root permissions are with the "CACLS" command (what a terrible name) and set them to some array variable (sorry don't remember details, long time no use) .. then you just set the permissions with that CACLS for the folder.

For writing batch files and for the syntax look up the following:
http://www.ericphelp...ch/nt/index.htm

if not satisfactory try search google
  • 0

#3
gladdie

gladdie

    New Member

  • Topic Starter
  • Member
  • Pip
  • 6 posts
Thanks for your reply. Since it cant inherit directly from the GrandParents, is there a way to always force it to inherit from the parents ? Cause sometimes the new folder i created doesn't always follow the parents permission. So i was thinking of writing a batch to force it to inherit the parents permission whenever i create a new file/folder.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP