I am trying to create a bat file which when double clicked will create a task in task scheduler from xml file. I need to modify the target location dynamically since the one given in the xml will be different.
So i wrote two commants, first one for creating task form the xml, next one will edit it.
schtasks.exe /Create /XML myxml.xml /tn "mytask" /RU SYSTEM
SchTasks /Change /TN "mytask" /TR "%cd%\start.vbs"
This is working fine, but the second line is asking for user password. Is there any way i can avoid this?