Hey,
You could give UDF a try
; #FUNCTION# ====================================================================================================================
; Name...........: _SetObjectOwner
; Description ...: Sets the owner of an object.
; Syntax.........: _SetObjectOwner($oName, $_SE_OBJECT_TYPE, $AccountName)
; Parameters ....: $oName - The name or handle to the object. This can be a path to a file or folder, a registry key,
; + a service name, a process handle, etc. See the comments on the _SE_OBJECT_TYPE enum for more info.
; $_SE_OBJECT_TYPE (Optional) - The type of the object to set permissions. This must be one of the values of the
; +_SE_OBJECT_TYPE enum. The default is $SE_FILE_OBJECT (a file or folder).
; $AccountName (Optional) - The account name or SID string to set. the default is the administrators group.
; +Can be any user name or SID string, see GetSidStruct() for more info.
; Return values .: Success - 1
; Failure - 0 and sets @error
; Author ........: FredAI
; Modified.......:
; Remarks .......:
; Related .......: _GetSidStruct
; Link ..........:
; Example .......: _SetObjectOwner('C:\Example.txt')