Oct 10

【Windows】Xcacls.vbs :cacls增强版   不指定

felix021 @ 2007-10-10 01:26 [IT » 操作系统] 评论(0) , 引用(0) , 阅读(4962) | Via 本站原创 | |
【Windows】Xcacls.vbs :cacls增强版  
要设置和使用 Xcacls.vbs,请按照下列步骤操作:1. 从以下 Microsoft 网站获得 Xcacls.vbs 的最新版本:



( http://download.microsoft.com/download/f/7/8/f786aaf3-a37b-45ab-b0a2-8c8c18bbf483/xcacls_installer.exe )  

2. 双击“Xcacls_Installer.exe”。当提示您提供放置提取文件的位置时,请指定一个位于计算机的搜索路径设置中的文件夹(如 C:\Windows)。  
3. 将默认脚本引擎从 Wscript 更改为 Cscript。(Xcacls.vbs 脚本最适合在 Cscript 下运行。)为此,请在命令提示符下键入以下内容,然后按 Enter:
cscript.exe /h:cscript
注意:将默认脚本引擎更改为 Cscript 只影响脚本向屏幕写入的方式。Wscript 根据“确定”对话框分别写入每一行。Cscript 将每一行写入命令窗口。如果您不想更改默认脚本引擎,则必须使用以下命令运行脚本
cscript.exe xcacls.vbs
但是,如果将默认脚本更改为 Cscript,则可以使用以下命令运行该脚本:
xcacls.vbs
.  
4. 要查看 Xcacls.vbs 的命令语法,请在命令提示符处键入下面的命令:
xcacls.vbs /?  


Perm: Is for "Files Only" and can be:
Permissions...
F Full control
M Modify
X read and eXecute
R Read
W Write
Advanced...
D Take Ownership
C Change Permissions
B Read Permissions
A Delete
9 Write Attributes
8 Read Attributes
7 Delete Subfolders and Files
6 Traverse Folder / Execute File
5 Write Extended Attributes
4 Read Extended Attributes
3 Create Folders / Append Data
2 Create Files / Write Data
1 List Folder / Read Data
Spec is for "Folder and Subfolders only" and has the
same choices as Perm.

/R user Revoke specified user's access rights.
(Will remove any Allowed or Denied ACL's for user.)

/P user:GUI Replace security permissions similar to standard choices.

/P user:perm;spec Replace specified user's access rights.
For access right specification see /G option.
(/P behaves like /G if there are no rights set for user.)

/D user:GUI Deny security permissions similar to standard choices.
/D user:perm;spec Deny specified user access rights.
For access right specification see /G option.
(/D adds to existing rights for user.)

/O user Change the Ownership to this user or group.

/I switch Inheritance flag. If omitted, the default is to not touch
Inherited ACL's. Switch can be:
ENABLE - This will turn on the Inheritance flag if
it is not on already.
COPY - This will turn off the Inheritance flag and
copy the Inherited ACL's
into Effective ACL's.
REMOVE - This will turn off the Inheritance flag and
will not copy the Inherited
ACL's. This is the opposite of ENABLE.
If switch is not present, /I will be ignored and
Inherited ACL's will remain untouched.

/L filename Filename for Logging. This can include a path name
if the file is not under the current directory.
File will be appended to, or created if it does not
exit. Must be Text file if it exists or error will occur.

If filename is omitted, the default name of XCACLS will
be used.

/Q Turn on Quiet mode. By default, it is off.
If it is turned on, there will be no display to the screen.


/DEBUG Turn on Debug mode. By default, it is off.
If it is turned on, there will be more information
displayed and/or logged. Information will show
Sub/Function Enter and Exit as well as other important
information.

/SERVER servername Enter a remote server to run script against.

/USER username Enter Username to impersonate for Remote Connections
(requires PASS switch). Will be ignored if it is for a Local Connection.

/PASS password Enter Password to go with USER switch
(requires USER switch).


Wildcard characters can be used to specify more than one file in a command, such as:
* Any string of zero or more characters
? Any single character

You can specify more than one user in a command.
You can combine access rights.



欢迎扫码关注:




转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   *非必须
网址   电邮   [注册]