#include <lsasecur.au3>
$sFormat = "The share resource '%s' is %s."
$sShareName = "\\ComputerName\ShareName"
$pDacl = _SeGetShareObjectDacl($sShareName)
If Not _SeIsValidAcl($pDacl) Then
MsgBox(48, "Error", _SeFormatMsg())
Exit
EndIf
$pSid = _SeLookupAccountName()
Switch _SeGetEffectiveRightsFromAcl($pDacl, $pSid)
Case 0x1301BF, 0x1F01FF
MsgBox(48, "OK", StringFormat($sFormat, $sShareName, "writable"))
Case 0x1200A9
MsgBox(48, "OK", StringFormat($sFormat, $sShareName, "read only"))
EndSwitch
_SeHeapFree($pSid)
|