SoFunction
Updated on 2025-04-08

Sharing how to set file access permissions by batch processing

0.904 Chinese Help:My download address
Example:
c:\nihao /dir /deny everyone /read_ex
Set the E:\wxDesktop folder everyone user for read and run permissions
SetACL MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /registry /deny
administrator /read
Set the registry key value Run to full control permission
------------------------------------------------------------------------------
0.904 Chinese Help:
usage:
[/i:] [/p:] [/r:]
[/sid] [/silent]
Note: The parameters in <> are required, and the parameters in [] are optional
==============================================================================
= Valid path to any local or remote object
------------------------------------------------------------------------------
= object type, any of the following parameters:
/file file
/dir directory
/printer printer
/registry registry
/service service
/share
------------------------------------------------------------------------------
= Operation, any of the following parameters
/deny Denied access to the specified user
/grant Grant access to specified users
/set Set the access permissions for the specified user
/revoke Revoke access to specified users
------------------------------------------------------------------------------
= User
------------------------------------------------------------------------------
= Permission, any of the following parameters
/file = Available parameters of the file object:
/read read
/write write
/read_ex Read and run
/change Modify
/full Full control
The following are special permissions:
/traverse
/list_dir Read data
/read_attributes Read attributes
/read_ea Read extended attributes
/add_file Write data
/add_subdir
/write_attributes Write attributes
/write_ea Write extended attributes
/delete_child
/delete
/read_dacl Retrieval
/write_dacl Write permission
/write_owner Obtain ownership
------------------------------------------------------------------------------
/dir = Available parameters for the directory object:
/read read
/write write
/list_folder List folder directory
/read_ex Read and run
/change Modify
/full Full control
The following are special permissions:
/traverse
/list_dir Read data
/read_attributes Read attributes
/read_ea Read extended attributes
/add_file Write data
/add_subdir
/write_attributes Write attributes
/write_ea Write extended attributes
/delete_child
/delete
/read_dacl Retrieval
/write_dacl Write permission
/write_owner Obtain ownership
------------------------------------------------------------------------------
/printer = Available parameters for the printer object:
/print
/man_printer Manage printers
/man_docs Manage documentation
/full Full control
------------------------------------------------------------------------------
/registry = Available parameters for the registry object:
/read read
/full Full control
The following are special permissions
/query_val query value
/set_val sets the value
/create_subkey Create child
/enum_subkeys enumeration child items
/notify Notification
/create_link Create link
/delete
/write_dacl Write to DAC
/write_owner Write to owner
/read_access read control
------------------------------------------------------------------------------
/service = Available parameters of the service object
{/read | /start_stop | /full}
------------------------------------------------------------------------------
/share = Available parameters for shared objects
/read read
/change
/full Full control