Tag: all


Clear All Windows Logs

1) Create a .bat file 2) Append the following: @echo off FOR /F "tokens=1,2*" %%V IN (’bcdedit’) DO SET adminTest=%%V IF (%adminTest%)==(Access) goto noAdmin for /F "tokens=*" %%G in (’wevtutil.exe el’) DO (call :do_clear "%%G") echo. echo Event Logs have been cleared! ^<press any key^> goto theEnd :do_clear echo clearing %1 wevtutil.exe cl %1 goto …


List all running processes in Java

Tasklist displays a list of applications and services with their Process ID (PID) for all tasks running on either a local or a remote computer. void ListAllProcesses() { try { Process p = Runtime.getRuntime().exec("tasklist"); BufferedReader reader = new BufferedReader( new InputStreamReader(p.getInputStream())); String line; while ((line = reader.readLine()) != null) { System.out.println(line); } } catch (Exception …