Here im using UWP Application for tracking Application closed or Open
Im Getting This error While Loading startProcWatcher = new ManagementEventWatcher(scope, queryString); Code:
string queryString =
"SELECT TargetInstance" +
" FROM __InstanceCreationEvent " +
"WITHIN .025 " +
" WHERE TargetInstance ISA 'Win32_Process' "
//+ " AND TargetInstance.Name = '" + processName + "'";
+ " AND TargetInstance.Name like '%'";
// The dot in the scope means use the current machine
string scope = @"\\.\root\CIMV2";
// Create a watcher and listen for events
startProcWatcher = new ManagementEventWatcher(scope, queryString);
startProcWatcher.EventArrived += ProcessStarted;
startProcWatcher.Start();
Please Give any suggestion for Overcome This Issue