开发者

How to get effective permission of a NTFS file using command line?

As per subject, is there a command or may be even a sample VBScri开发者_C百科pt that I can use to calculate/read effective permission of a file in Windows XP and Windows Server 2003 OS? All I want is to be able to get same information as I see in "effective permission" tab of Security->Advanced option of a NTFS file.

Commands like calcs, icacls etc don't provide effective permission- they can list inherited permission but they don't calculate effective permission.

EDIT- Based upon below answer, it isn't really possible by means of using VB Script. I'll write a piece of code and then call it from VBScript


Sysinternals' AccessChk should do the trick.

There is no built-in tool for this task. And I seriously doubt that calculating the effective permissions from VBScript is possible.

Programmatically the effective permissions can be determined by calling the API function GetEffectiveRightsFromAcl or using the more modern Authz API (example, scroll down a little).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜