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.eventho ugh the keypath should accept a string ..any reference to the same..
Code:
strQuery = " SELECT * FROM RegistryKeyChan geEvent WHERE
KeyPath = 'asdf'"
WqlEventQuery WqlQuery = new WqlEventQuery(s trQuery);
watcher = new ManagementEvent Watcher(wmiMgmt Scope, WqlQuery);
watcher.EventAr rived += Eventhandler;
watcher.Start() ;
Regards,
Sakthi
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.eventho ugh the keypath should accept a string ..any reference to the same..
Code:
strQuery = " SELECT * FROM RegistryKeyChan geEvent WHERE
KeyPath = 'asdf'"
WqlEventQuery WqlQuery = new WqlEventQuery(s trQuery);
watcher = new ManagementEvent Watcher(wmiMgmt Scope, WqlQuery);
watcher.EventAr rived += Eventhandler;
watcher.Start() ;
Regards,
Sakthi
Comment