nerden 8 Newbie Poster

I am building a VB.NET app which amond other things, deploys a scheduled task to run test.bat when A Windows Server 2008 Backup is cancled.
I have the app all working which runs a command which, when works, will be the event creation command.
I figured out how it would work for something in the "System" event log, however I want my task to run based on a Backup event

I want to attach my event to EventID 8 (Backup Cancled) within the "Applications and Services Logs/Microsoft/Windows/Backup/Operations" log

So far I have this:

SCHTASKS /Create /RU Administrator /RP p455w0rd /TN BackupSuccess4 /TR C:\test.bat /SC ONEVENT /EC Microsoft-Windows-Backup /MO *[System/Provider/Microsoft-Windows-Backup/EventID=8]

If you any better idea's im all open ears

Thanks in advance

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.