Guest User

Untitled

a guest
Oct 20th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.43 KB | None | 0 0
  1. Func _SelfDelete($iDelay = 0)
  2.     Local $sCmdFile
  3.     FileDelete(@TempDir & "scratch.bat")
  4.     $sCmdFile = 'ping -n ' & $iDelay & '127.0.0.1 > nul' & @CRLF _
  5.             & ':loop' & @CRLF _
  6.             & 'del "' & @ScriptFullPath & '" > nul' & @CRLF _
  7.             & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _
  8.             & 'del ' & @TempDir & 'scratch.bat'
  9.     FileWrite(@TempDir & "scratch.bat", $sCmdFile)
  10.     Run(@TempDir & "scratch.bat", @TempDir, @SW_HIDE)
  11. EndFunc
Add Comment
Please, Sign In to add comment