SQL Script with hyphen in the value set

5 pts.
Tags:
SQL Scripting
SQL scripts
We have a particular piece of malware that will put some binary code in the HKLM/System/ControlSet001/Services/{5083B7D5-47AF-8FF9-657C651C2B10}/ I am using an sql script along with Microsofts logparser to parse some data out of the registry on a windows box and I am having trouble with the last bit of the code. The data is located at HKLM/System/ControlSet001/Services/{5083B7D5-47AF-8FF9-657C651C2B10}/ The date inside the parenthesis is never the same so my script looks like this. SELECT TOP 1000 ComputerName, Path, Keyname, ValueName, Valuetype, Value, Lastwritetime INTO *.-servi001ces.csv FROM \$NAME$HKLMControlSet001Services{550D0230-5A10-46A2-B53E-6050E712BBCD} I get an error of "error opening key. The values inside the parenthesis is never the same and sql does not like the hyphens. Is there a wildcard that can be used for each value and how do I get around the hyphen problem. I have tried the * for each value but no success. Mark

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Gent01
    Have you tried enclosing the key in [ ]
    1,870 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following