Jump to content

Set ACL on windows Objects


ptrex
 Share

Recommended Posts

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
OPT("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$form1 = GUICreate("BORN-2-KICK",347, 284 )
GUISetFont(7, 400, 0, "MS Serif")
$Input1 = GUICtrlCreateInput("", 8, 32, 65, 19)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ENTER YOUR ID 01 HERE!!")
$Input2 = GUICtrlCreateInput("", 8, 52, 65, 19)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ENTER YOUR ID 02 HERE!!")
$Input3 = GUICtrlCreateInput("", 8, 72, 65, 19)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ENTER YOUR ID 03 HERE!!")
$Input4 = GUICtrlCreateInput("", 8, 92, 65, 19)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ENTER YOUR ID 04 HERE!!")
$Input5 = GUICtrlCreateInput("", 8, 112, 65, 19)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ENTER YOUR ID 05 HERE!!")
$Input6 = GUICtrlCreateInput("", 77, 32, 65, 19)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ENTER YOUR ID 06 HERE!!")
$Input7 = GUICtrlCreateInput("", 77, 52, 65, 19)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ENTER YOUR ID 07 HERE!!")
$Input8 = GUICtrlCreateInput("", 77, 72, 65, 19)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ENTER YOUR ID 08 HERE!!")
$Input9 = GUICtrlCreateInput("", 77, 92, 65, 19)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ENTER YOUR ID 09 HERE!!")
$Input10 = GUICtrlCreateInput("", 77, 112, 65, 19)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ENTER YOUR ID 10 HERE!!")
$Input11 = GUICtrlCreateInput("", 8, 132, 135, 19, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
GUICtrlSetTip(-1, "ENTER YOUR PASSWORD HERE!!")
$Button1 = GUICtrlCreateButton("SAVE", 8, 152, 65, 17)
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton("CLEAR", 78, 152, 65, 17)
GUICtrlSetCursor (-1, 0)
$Input12 = GUICtrlCreateInput("", 8, 172, 65, 19)
GUICtrlSetBkColor(-1, 0xC0C0C0)
GUICtrlSetTip(-1, "PROTECT ID 01")
$Input13 = GUICtrlCreateInput("", 8, 192, 65, 19)
GUICtrlSetBkColor(-1, 0xC0C0C0)
GUICtrlSetTip(-1, "PROTECT ID 02")
$Input14 = GUICtrlCreateInput("", 8, 212, 65, 19)
GUICtrlSetBkColor(-1, 0xC0C0C0)
GUICtrlSetTip(-1, "PROTECT ID 03")
$Input15 = GUICtrlCreateInput("", 8, 232, 65, 19)
GUICtrlSetBkColor(-1, 0xC0C0C0)
GUICtrlSetTip(-1, "PROTECT ID 04")
$Input16 = GUICtrlCreateInput("", 8, 252, 65, 19)
GUICtrlSetBkColor(-1, 0xC0C0C0)
GUICtrlSetTip(-1, "PROTECT ID 05")
$Button3 = GUICtrlCreateButton("OPEN", 78, 172, 65, 17)
GUICtrlSetCursor (-1, 0)
$Button4 = GUICtrlCreateButton("CLOSE", 78, 192, 65, 17)
GUICtrlSetCursor (-1, 0)
$Button5 = GUICtrlCreateButton("RE-Login", 78, 212, 65, 17)
GUICtrlSetCursor (-1, 0)
$Button6 = GUICtrlCreateButton("Cek Balance", 78, 233, 65, 17)
GUICtrlSetCursor (-1, 0)
$Input17 = GUICtrlCreateInput("350", 152, 32, 89, 19, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
GUICtrlSetTip(-1, "DELAY")
$Input18 = GUICtrlCreateInput("74.217.68.1", 78, 252, 64, 19, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1, 0xA0A0A4)
$Input19 = GUICtrlCreateInput("ROOM", 248, 32, 89, 19, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetTip(-1, "ROOM")
$Button7 = GUICtrlCreateButton("ENTER", 248, 53, 41, 17)
GUICtrlSetCursor (-1, 0)
$Button8 = GUICtrlCreateButton("LEAVE", 296, 53, 41, 17)
GUICtrlSetCursor (-1, 0)
$Button9 = GUICtrlCreateButton("Get List", 152, 53, 89, 17)
GUICtrlSetCursor (-1, 0)
$Button10 = GUICtrlCreateButton("KILL", 152, 212, 89, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Serif")
GUICtrlSetCursor (-1, 0)
$Input20 = GUICtrlCreateInput("", 248, 72, 89, 19)
GUICtrlSetTip(-1, "TARGET KICK 01")
$Input21 = GUICtrlCreateInput("", 248, 92, 89, 19)
GUICtrlSetTip(-1, "TARGET KICK 02")
$Input22 = GUICtrlCreateInput("", 248, 112, 89, 19)
GUICtrlSetTip(-1, "TARGET KICK 03")
$Input23 = GUICtrlCreateInput("", 248, 132, 89, 19)
GUICtrlSetTip(-1, "TARGET KICK 04")
$Input24 = GUICtrlCreateInput("", 248, 152, 89, 19)
GUICtrlSetTip(-1, "TARGET KICK 05")
$Input25 = GUICtrlCreateInput("", 248, 172, 89, 19)
GUICtrlSetTip(-1, "TARGET KICK 06")
$Input26 = GUICtrlCreateInput("", 248, 192, 89, 19)
GUICtrlSetTip(-1, "TARGET KICK 07")
$Input27 = GUICtrlCreateInput("", 248, 212, 89, 19)
GUICtrlSetTip(-1, "TARGET KICK 08")
$Input28 = GUICtrlCreateInput("", 248, 232, 89, 19)
GUICtrlSetTip(-1, "TARGET KICK 09")
$Input29 = GUICtrlCreateInput("", 248, 252, 89, 19)
GUICtrlSetTip(-1, "TARGET KICK 10")
$Button11 = GUICtrlCreateButton("EXIT", 152, 256, 89, 17)
GUICtrlSetCursor (-1, 0)
$Button12 = GUICtrlCreateButton("READY", 152, 192, 89, 17)
GUICtrlSetCursor (-1, 0)
$Group1 = GUICtrlCreateGroup("Get Timer IN", 152, 144, 89, 41, $BS_CENTER)
$Radio1 = GUICtrlCreateRadio("60s", 160, 160, 33, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio2 = GUICtrlCreateRadio("40s", 200, 160, 33, 17)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetTip(-1, "Activ For Next Version")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button13 = GUICtrlCreateButton("About", 200, 122, 41, 17)
GUICtrlSetCursor (-1, 4)
$Button14 = GUICtrlCreateButton("B-2-K", 152, 120, 41, 17)
GUICtrlSetCursor (-1, 4)
$Group2 = GUICtrlCreateGroup("MODE WAR", 152, 72, 89, 41, $BS_CENTER)
$Radio3 = GUICtrlCreateRadio("A", 160, 88, 25, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio4 = GUICtrlCreateRadio("B", 200, 88, 25, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

WHILE 1
    $Delay = IniRead("SET-01.ini", "modified by autoiters", "Delay", "")
    SLEEP(200)
        If WinExists("BORN-2-KICK" , "") Then
        WinClose("BORN-2-KICK" , "")
    EndIf
WEND

this my script n please i need example setacl for this script i dont understand look sample in forum....

thanks n please help me

Edited by stones
Link to comment
Share on other sites

@stones,

I don't see in your script where ever you would need tha SetACL function ?

regards

ptrex

yes i need func setacl for my script...

please help me...

please give me example setacl with my scrip

thanks before ptrex

Link to comment
Share on other sites

my script want use setacl....

but i dontknow use func setacl.....

wath you have application with setacl protect ptrex?

if you want i need look your script

No one can help you because no one, except you, know what you want to do. Also read the link provided on the first post, this will help you.

Link to comment
Share on other sites

  • 2 years later...

Using the examples in this thread and the help file on the website, I made a small snippet that uses the SetACL COM dll to get a file's owner:

Func _GetOwner($strFileName)
$SetACL1 = ObjCreate("SetACL.SetACLCtrl.1")
If IsObj($SetACL1) then
With $SetACL1
  $nError = .SetObject($strFileName, $SE_FILE_OBJECT)
  $nError = .AddAction($ACTN_LIST)
  $nError = .SetListOptions($LIST_TAB, $SD_OWNER, False, $LIST_NAME)
  $nError = .Run
  $nError = .GetLastListOutput()
Endwith
;MsgBox(0,"", $nError)
$OWNER = StringSplit($nError, ":")
;_ArrayDisplay($owner)
$OWNER = StringStripWS($OWNER[2], 7)
;~ MsgBox(0,"",$OWNER)
Else 
    Msgbox(0,"Error","No Object Found")
EndIf
Return($OWNER)
EndFunc

Hopefully this might help others who want to use this useful DLL

Edited by PowerCat
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...