Jump to content

Recommended Posts

Posted (edited)

Hi

I am looking for a way to silent run (without pop up of shell window) this command (to clean all windows event logs) from cmd if it is possible :

for /f %x in ('wevtutil el') do wevtutil cl "%x"

or from a bat file using this one that works but invisible again:

for /f %%x in ('wevtutil el') do wevtutil cl "%%x"

Thanks

Edited by Pamamolf

Posted

You can use a VBS script to not show any windows 

Example

'-> Constants For The Various Window States
Const Hide = 0, Norm = 1, Min = 2, Max =3 
'-> Object For Runtime
Dim Act :Set Act = CreateObject("Wscript.Shell")
'-> Hidden Window And No Wait For The Script
 Act.Run("%comspec% /C @Echo Off && CLS && Echo. && Echo Test &&  ping -n 3 127.0.0.1>nul"),0,False
'-> Show The Normal Window And Wait For The Script To Finish
' Act.Run("%comspec% /C @Echo Off && CLS && Echo. && Echo Test &&  ping -n 3 127.0.0.1>nul"),1,True 
Posted

Confused on how to edit this vbs with the two commands that i want to use:

for /f %x in ('wevtutil el') do wevtutil cl "%x"
vssadmin delete shadows /for=c: /all /quiet

Also is it possible to enable admin rights with it but quiet without any prompt or visible window?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...