Windows 10 schtasks The task XML is malformed.

Cardinal System

Honorable Member
Joined
Jan 24, 2016
Location
New Hampshire
Hello,

I am trying to import a scheduled task from from the command line to the task scheduler. Before my program runs the schtasks command, it inserts a file path in the
Code:
<Command></Command>
element. The XML file works with schtasks before I insert my file path, but not afterwords. It keeps giving the same message:

Code:
ERROR: The task XML is malformed.

(1,2)::ERROR: incorrect document syntax

Interestingly enough, I am able to import the task with the Task Scheduler GUI. Not sure why schtasks is not working here. I am using the same UTF-16 and everything. I will link the XML file to this thread in case you want to take a look at it: TheCardinalSystem/LOTHProject

Any help is appreciated!
 
Last edited:
Back
Top Bottom