Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27193

Help with executing command from cmd

$
0
0
Hi,
I am trying to execute this command from cmd when a button is clicked:

Code:

wevtutil qe system "/q:*[System [(Level=2)]]" /f:text /c:5 /rd:True
The problem is that I can't execute it successfully due to the presence of the Quotations in the cmd line of code itself.

The code in Visual Studio looks somewhat like this:

Code:

Shell("cmd /c wevtutil qe system " /q:*[System [(Level=2)]]"/f:text /c:5 /rd:true >C:\Last5.txt", vbHide)
I'd really appreciate the help with this, please.

Thanks in advance...

Viewing all articles
Browse latest Browse all 27193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>