Hi,
Is there a way to use an environment variable like %username%, into a xml file? I need to create a scheduled task from .xml file but I need to get the current logged user into the .xml file.
I'll appreciate any suggestion.
Regards.
<?xml version="1.0" encoding="UTF-16"?><Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"><RegistrationInfo><Date>2015-02-06T07:38:03</Date><Author>NEEDLOGGEDUSERHERE</Author></RegistrationInfo><Triggers><CalendarTrigger><StartBoundary>2015-02-06T07:45:00</StartBoundary><Enabled>true</Enabled><ScheduleByWeek><DaysOfWeek><Friday /></DaysOfWeek><WeeksInterval>1</WeeksInterval></ScheduleByWeek></CalendarTrigger><CalendarTrigger><StartBoundary>2015-02-06T19:30:00</StartBoundary><Enabled>true</Enabled><ScheduleByWeek><DaysOfWeek><Friday /></DaysOfWeek><WeeksInterval>1</WeeksInterval></ScheduleByWeek></CalendarTrigger><CalendarTrigger><StartBoundary>2015-02-06T02:00:00</StartBoundary><Enabled>true</Enabled><ScheduleByWeek><DaysOfWeek><Friday /></DaysOfWeek><WeeksInterval>1</WeeksInterval></ScheduleByWeek></CalendarTrigger></Triggers><Principals><Principal id="Author"><UserId>NEEDLOGGEDUSERHERE</UserId><LogonType>InteractiveToken</LogonType><RunLevel>LeastPrivilege</RunLevel></Principal></Principals><Settings><MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy><DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries><StopIfGoingOnBatteries>true</StopIfGoingOnBatteries><AllowHardTerminate>true</AllowHardTerminate><StartWhenAvailable>false</StartWhenAvailable><RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable><IdleSettings><StopOnIdleEnd>true</StopOnIdleEnd><RestartOnIdle>false</RestartOnIdle></IdleSettings><AllowStartOnDemand>true</AllowStartOnDemand><Enabled>true</Enabled><Hidden>false</Hidden><RunOnlyIfIdle>false</RunOnlyIfIdle><WakeToRun>false</WakeToRun><ExecutionTimeLimit>P3D</ExecutionTimeLimit><Priority>7</Priority></Settings><Actions Context="Author"><Exec><Command>\\apptorun\app.exe</Command></Exec></Actions></Task>