danrhodes
Posts: 2
Joined: Wed Feb 21, 2018 7:10 pm

Windows Server Backup - Schedule task on Event ID

Hey, such a simple task but i literally cannot get it to work!

Im trying to create a scheduled task that runs on an event, the event being an event ID 4 from windwows Server Backup, can anyone take a look at my code below to see what im doing wrong??!?? The first section is the code from the exported task XML but i understand it has to be escaped so below that is my attempt at making it work with Advanced Installer. If anybody can help it would be greatly appriciated.

XML From Task
<QueryList>
<Query Id="0" Path="Microsoft-Windows-Backup">
<Select Path="Microsoft-Windows-Backup">*[System[Provider[@Name='Microsoft-Windows-Backup'] and EventID=4]]</Select>
</Query>
</QueryList>

Escaped XML not working :-(
<QueryList>
<Query Id="0" Path="Microsoft-Windows-Backup">
<Select Path="Microsoft-Windows-Backup">*[\[]System[\[]Provider[\[]@Name='Microsoft-Windows-Backup'[\]][\]][\]] and EventID="4"[\]][\]]</Select>
</Query>
</QueryList>
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Windows Server Backup - Schedule task on Event ID

Hi and welcome to our forums.

In the escaped XML snippet that you attached, I see that you added two extra square brackets as marked below. Can you remove them and see if it works?
<QueryList>
<Query Id="0" Path="Microsoft-Windows-Backup">
<Select Path="Microsoft-Windows-Backup">*[\[]System[\[]Provider[\[]@Name='Microsoft-Windows-Backup'[\]][\]][\]] and EventID="4"[\]][\]]</Select>
</Query>
</QueryList>


Also, please keep in mind that in order to create a scheduled task in Advanced Installer, you can use the support from the "Scheduled Task page.

Let me know if you have other questions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
danrhodes
Posts: 2
Joined: Wed Feb 21, 2018 7:10 pm

Re: Windows Server Backup - Schedule task on Event ID

Hi, thank you for your kind welcome to the forum and also for your reply to my issue. I will try this today and let you know.

Thanks you.

Dan
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Windows Server Backup - Schedule task on Event ID

You're welcome Dan.

Just let me know if the problem persists.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”