Sign in to follow this  
Followers 0
mdwerne

ComSpec syntax issue

3 posts in this topic

Can anyone help me correctly format the following command line? All of my attempts have proven fruitless.

wevtutil qe Application /q:"*[System[Provider[@Name='EMET']]]" /rd:true /c:1 /f:text > c:\EMET.log

Here is what I've tried:

Local $Result = RunWait(@ComSpec & " /c wevtutil.exe qe Application /rd:true /c:1 /q:*[System[Provider[@Name=EMET]]] /f:text > " & $LogFile, @SystemDir, @SW_SHOW)

Local $Result = RunWait(@ComSpec & ' /c wevtutil.exe qe Application / q:" *[System[Provider[@Name = "EMET"]]]" / rd:true / c:1 / f:text > ' & $LogFile, @SystemDir, @SW_HIDE)

Local $Result = RunWait(@ComSpec & " /c wevtutil.exe qe Application / q:"*[System[Provider[@Name='EMET']]]" / rd:true / c:1 / f:text > " & $LogFile, @SystemDir, @SW_HIDE)

Thanks for any suggestions,

-Mike

Share this post


Link to post
Share on other sites



Try this:

Local $Result = RunWait(@ComSpec & ' /c wevtutil qe Application /q:"*[System[Provider[@Name=' & "'EMET']]]" & '" /rd:true /c:1 /f:text > c:EMET.log', @SystemDir, @SW_SHOW)
1 person likes this

When the words fail... music speaks

Share this post


Link to post
Share on other sites

Try this:

Local $Result = RunWait(@ComSpec & ' /c wevtutil qe Application /q:"*[System[Provider[@Name=' & "'EMET']]]" & '" /rd:true /c:1 /f:text > c:EMET.log', @SystemDir, @SW_SHOW)

BIMBO!!!

Thanks for the help Andreik, works perfectly! I really need to get a better handle on single and double quotes, this stuff trips me up almost everytime.

-Mike

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0