Hi,
during Registry key change event ,if i give wrong keypath .it saying invalid query.if i give existing keypath then code is executing correctly ...
my doubt is ,how the event registration is happening in case of Registry key change.
why it saying invalid query in case of wrong input to the keypath.eventhough the keypath should accept a string ..any reference to the same..
Code:
strQuery = " SELECT * FROM RegistryKeyChangeEvent WHERE
KeyPath = 'asdf'"
WqlEventQuery WqlQuery = new WqlEventQuery(strQuery);
watcher = new ManagementEventWatcher(wmiMgmtScope, WqlQuery);
watcher.EventArrived += Eventhandler;
watcher.Start();
Regards,
Sakthi