I have task scheduler xml file that i am trying to edit.
<?xml version="1.0" encoding="UTF-16"?>
<Task xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task" version="1.4">
<RegistrationInfo>
<Date>2017-03-12T16:40:52.4111579</Date>
<Author>Kevin</Author>
<Description>Runs Batch File For Counter</Description>
<URI>THETASKTITLEGOESHERE</URI>
</RegistrationInfo>
<Actions Context="Author">
<Exec>
<Command>"ACTIONGOESHERE"</Command>
</Exec>
</Actions>
</Task>
Here is what i have in the batch file.
@echo off
pushd %~dp0
xml ed -inplace -r "/Task/RegistrationInfo/Author" -v CGL XMLTEST1.xml
xml ed -inplace -r "/Task/RegistrationInfo/URI" -v CGL-FakeTitle XMLTEST1.xml
xml ed -inplace -r "/Task/Actions/Exec/Command" -v "C:\Batch\Counter.bat" XMLTEST1.xml
pause
I have tried the suggestions here; xmlstarlet update value nothing happens
Adding the " > XMLTEST1output.xml" at the end resulted in an empty file. Any suggestions would be helpful. Thank you!