I have tried everything, after using your command above, I even tried "ATTACH TASK TO THIS EVENT" after creating the custom event ID. I just don't how to make it work. Nothing is running. Even tried eventcreate.exe /l APPLICATION /so "DUTY" /t SUCCESS /id 1 /d "DUTY2"
I have a bunch of tasks that share the same beginning text, DUTY, in this case, with different endings like DUTY1, DUTY2. How do I use wildcards so whenever any task with DUTY-beginning runs, this task will trigger. I've tried DUTY*, *DUTY* even %DUTY%, but they don't work.
<QueryList>
<Query...
Im not well versed in powershell. Can any PS1 script be triggered by an eventID, then if the script recognizes that if its lets say, specifically, the SANDISK USB, itll do something? I just know this is possible.
Im getting confused. I did this manually.
In task scheduler
Triggers Tab :
I created a Task Trigger as 'On an event'
Log: Microsoft-Windows-DriverFrameworks-UserMode/Operational
Source: DriverFrameworks-UserMode
EventID: 2101
Actions Tab :
Powershell.exe -ArgumentList -ExecutionPolicy...
May I ask what type of trigger do I assign it, at logon, on an event, etc? I updated it to what you just said, but still did not do anything. For the Task's Action, I put Powershell.exe and its argument is -File C:\USB.ps1. This is correct right ?!
Thankyou for your script. I created a task, put powershell to run the .PS1 script. So I changed the script to $DeviceID = 'USBSTOR%SANDISK%ULTRA%', changed $Connect_Action = {C:\Windows\system32\cmd.exe} and $Disconnect_Action = {C:\windows\notepad.exe} so it runs those programs to notify me if...
I'm striving on how to create a XML filter to trigger a task when a SPECIFIC usb drive is plugged in. Ive tried this, but it does not work. How do I incorporate the part where it says LifetimeID and InstanceID ???
<QueryList>
<Query Id="0"...