Yes, Jenkins is running as a service. However, I have created a user account named Jenkins and I run the service on that account. I have verified that the Jenkins user account can run the unit tests successfully. I don't know what else is required to "give the service the ability to interact with the desktop". I have scoured the DCOM and service configurations, and I've experimented with all settings that seem possibly relevant, yet nothing works.
Actually, one thing works: In the DCOM configuration, there is a way to tell the system to always run Microsoft Excel applications as a specific user. I have told it to always run Excel as the Jenkins user. I don't know why this makes a difference because the Jenkins service is already running everything as the Jenkins user, yet this somehow suppresses the error. I am using this workaround for now, but I regard it as a kludge, and not as an acceptable long-term solution.
With a little speculation, I think I can answer my own original question:
Q: What does Jenkins do differently when it executes a Windows batch command that could explain the failure?
A: Jenkins doesn't do anything differently, per se, but is running as a service, and when Windows decides what is allowed to happen on a computer, it doesn't just consider the user privileges; it also considers whether or not the commands were issued by a service. Microsoft Excel and other COM applications, in particular, seem to be off-limits to service-issued commands even when fully accessible to the user issuing the commands.
Thank you, Slide, for your reply, and thanks to all others who read and considered my question. I am going to set this problem aside for now and come back to it later when I have spare time and possibly a fresh perspective.
-TC