1.

How To Give Permission For Files, Folders & Registry Keys Through Vb Script & What Is The Syntax?

Answer»

We can give permission for files & folders through VB Script by using the CACLS & XCACLS commands:

  1. CACLs should only run on NTFS partitions.
  2. CACLS – Changes Access Control ListS
  3. “Cacls <file name> [/T] [/E] [/C] [/G user: PERM] [/R user [...]] [/P user: perm [...]]
  4. [/D user [...]] “
  5. /T Changes ACLs of specified files in the CURRENT directory and subdirectories
  6. /E EDIT ACL instead of replacing it
  7. /C Continue (ignore) access denied errors
  8. /G user: perm where access rights granted can be: R C F (read, change, full control)
  9. /R user Revoke specified user's access rights (only valid with /E)
  10. /P user: perm Replace specified user's access rights. Permission can be: N R C F (NONE, read, change, full control)
  11. /D user DENY specified user access

E.g. “cacls c:myfile.txt /E /G <user name>: F”

We can give permission for files & folders through VB Script by using the CACLS & XCACLS commands:

E.g. “cacls c:myfile.txt /E /G <user name>: F”



Discussion

No Comment Found