• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

using batch files

bwanaaa

Senior member
this command works fine when i paste it into a command window that was opened as admin

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

but when i save this one liner as a batch file, right click on it and say to run as admin,
I get a quick command window that disappears but nothing has executed.

running win 8.1

(btw, that code is to clear all event logs)
 
I only know the basics of batch and havn't used win8

but I think thats normal operation unless u add the line... "pause" at the end, or it will exacute so fast you may not even see it.
 
cmd has worked this way since windows vista. If you just run a command from "run" or a batch file, it will run and then immediately close the command prompt window.

The only way to make it stay is run cmd first and then enter the commands, or use some sort of pause or wait for user input at the end of your bat.
 
Open your command window and run the .bat file from there rather than running it by clicking on. The command window will let you see the output.

You need to change your %x to %%x to get this to work in a .bat file.
 
Back
Top