Jump to content

Dellroc

Members
  • Posts

    2
  • Joined

  • Last visited

Dellroc's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Please tell me where I was wrong. I can not assign a right to a service. #include <Array.au3> #include <Permissions.au3> #include <Security.au3> Opt('MustDeclareVars',1) Opt('TrayIconHide',1) Global $gDACL Global $gPerm[0][3] Global $tAr Global $tAr = _Security__LookupAccountName('Test') Global $tPerm[1][3]=[[$tAr[0],1,131581]] ;~ _ArrayDisplay($tPerm,'$tPerm') If _SetObjectPermissions('AdobeARMservice', $SE_SERVICE, $tPerm) = 1 Then ConsoleWrite('Good'&@error&@CRLF) Else ConsoleWrite('Bad '&@error&@CRLF) EndIf $gDACL = _GetObjectDACL('\\'&@ComputerName&'\AdobeARMservice',$SE_SERVICE) _MergeDaclToArray($gDACL, $gPerm) For $i=0 To UBound($gPerm)-1 $gPerm[$i][0] = _Security__SidToStringSid($gPerm[$i][0]) $tAr = _Security__LookupAccountSid($gPerm[$i][0]) $gPerm[$i][0] = $tAr[1]&'\'&$tAr[0] ; Domain\Username Next _ArrayDisplay($gPerm,'$gPerm')
×
×
  • Create New...