I have a scheduled task that I am going to deploy through a script.
The task needs to be interactive with the users desktop, so I think I need to use AT.
I also want to be able to remove the task from the computers when something in the task needs to be updated or if the task is no longer needed.
I do not want to delete all the other scheduled tasks when I do this, so I want my script to have a specific ID number that I can delete at a later date.
I have checked the documentation for the AT command, but I cannot find documentation on how to create a scheduled task with a specific ID. (http://support.microsoft.com/kb/313565)
Is there a way to create a scheduled task with a specific ID, or am is there a better way to achieve my goals?
Clients are Windows-XP Scheduled task runs a small executable. All clients are part of a domain, and I have domain admin rights.
Aco\cording to the documentation, you cannot create a specific task ID (just like you cannot create a specific PId for a process), but you can find the task ID of a task when it's running (by typing 'at' at a command-line) and then delete it.
You can also get/delete scheduled task ID programatically using WMI objects (take a look at this link).
While you can't specify the ID that is used with the AT command, you can use this script to identify the ID that your AT scheduled task is using so you can delete it from a batch file:
Usage: Simply set sCommand to the name of the command that you have scheduled that you want to remove.