Guest User

Untitled

a guest
Oct 7th, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.24 KB | None | 0 0
  1. Global $path, $file
  2.  
  3. DirSetZoneIdentifier(@ScriptDir & '\X64bit\')
  4. DirSetZoneIdentifier(@ScriptDir & '\X86bit\')
  5. DirSetZoneIdentifier(@ScriptDir & '\X86-X64bit\')
  6. ;~ MsgBox(64, "", $path & @CRLF & $file)
  7.  
  8.     Func FileSetZoneIdentifier($Filename, $ZoneId=0)
  9.         MsgBox(0,'','11')
  10.             Local $File = FileOpen($Filename & ":Zone.Identifier:$DATA",  2)
  11.             MsgBox(0,'','12')
  12.             FileWrite($File, "[ZoneTransfer]" & @CRLF & "ZoneId=" & $ZoneId)
  13.             MsgBox(0,'','13')
  14.             FileClose($File)
  15.             MsgBox(0,'','14 ')
  16.     EndFunc
  17.  
  18.     Func DirSetZoneIdentifier($path, $ZoneId=0)
  19.         MsgBox(0,'','1')
  20.             Local $search = FileFindFirstFile($path & "*.exe"), $file
  21.             MsgBox(0,'','2')
  22.             If $search = -1 Then Return False
  23.             MsgBox(0,'','3')
  24.             Do
  25.                 MsgBox(0,'','4')
  26.                     $file = FileFindNextFile($search)
  27.                     MsgBox(0,'','4')
  28.                     If @error Then ExitLoop
  29.                     MsgBox(0,'','5')
  30.                     MsgBox(64, "", $path & $file)
  31.                     MsgBox(0,'','6')
  32.                     FileSetZoneIdentifier($path & $file, $ZoneId)
  33.                     MsgBox(0,'','7')
  34.                 Until False
  35.                 MsgBox(0,'','8')
  36.             FileClose($search)
  37.             MsgBox(0,'','9')
  38.             Return True
  39.             MsgBox(0,'','10')
  40.     EndFunc
Add Comment
Please, Sign In to add comment