if i do that the script just hangs. If you do schtasks /create /? from the command prompt, it says that the /RU needs the username wrapped in double quotes.
I have tried removing the single quotes, and repalcing with double quotes, adding both double and single quotes, wrapping /TN $id in single and double quotes... ive tried everything!
There must be a way of doing htis... otherwise you could never schedule multiple tasks using 1 schtask command. if the AT scheduler encounters an existing task taht is scheduled, it renames the identifier itself by incrementing by 1. but if schtasks task encounters an existing task, it fails because it already exists due to the unique taskname denoted by /TN. the $id i am using is unique each time the script runs which is why i want the taskname to be named this variable.
any help is greatly appreciated!!!!!!!!
Thanks