Skip to content

Commit

Permalink
Update WinLogs_Killer.au3
Browse files Browse the repository at this point in the history
Fixed stupid bug on Event Log Cleaning function.
  • Loading branch information
ScorpioTM committed Oct 24, 2017
1 parent 7138f52 commit 971d18b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions WinLogs_Killer.au3
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Script Version: 1.0.1
Author: Scorpio
Script Function:
Expand Down Expand Up @@ -37,7 +38,10 @@ Func _ClearEventLog()
While True
$Line = FileReadLine($List)
If @Error = -1 Then ExitLoop
ConsoleWrite('Deleting Events Log: ' & $Line & @CRLF)

RunWait(@ComSpec & ' /c wevtutil.exe clear-log "' & $Line & '"', @SystemDir, @SW_HIDE)
If @Error Then ConsoleWrite('An Error as ocurred Deleting the Log: ' & $Line & @CRLF)

Sleep(100)
WEnd

Expand Down Expand Up @@ -96,4 +100,4 @@ Func _ClearRecentLog()
EndIf

Return SetError(0, 'RDP Connection Log clear sucessfully', True)
EndFunc
EndFunc

0 comments on commit 971d18b

Please sign in to comment.