Solved
If it's part of the build process, you probably need to start that as an interactive session.
This isn't something I've ever done myself, but this looks like it might be helpful?
https://msdn.microsoft.com/en-us/library/ms181712(vs.110).aspx#interactive