The issue is the file for the inject command.
You have import an file with install script. This file has variables.
you have to check the you template has this variable when you schedule it.
1. You create this file OS Deployment Capture Profile
2. Open this file and search for %
3. Replace all Windows Variables with double percent signs %%
4. Other Variables like %ldHostname% need only one percent signs
5. Import this file with Install Scripts / or change it
6. Test again
You can look under C:\Windows\Temp\InjectHandler.log, maybe you found more information about the wrong variables.
I was missing a couple of %% in the command.xml.