本帖最后由 matai5156 于 2012-1-9 16:02 编辑
_SeGetFileSecurity获取其他机器上的用户组权限时,用户组名称是空白的,怎么能解决呢,十分着急,请帮忙,谢谢#include <lsasecur.au3>
#include <Array.au3>
$sFilePath = "\\192.168.165.83\e$\123" ; 此处为任意其他PC
$iSecur = BitOR($SE_INFO_OWNER, $SE_INFO_DACL)
$pSecur = _SeGetFileSecurity($sFilePath, $iSecur)
If ($pSecur = 0) Then
MsgBox(48, "Error", _SeFormatMsg("_SeGetFileSecurity"))
Exit
EndIf
$pOwner = _SeGetSecurityDescriptorOwner($pSecur)
$pDacl = _SeGetSecurityDescriptorDacl($pSecur)
$sOwner = _SeLookupAccountSid($pOwner)
$aList = _SeEnumEntriesFromAcl($pDacl)
_ArrayDisplay($aList, $sOwner)
|