Getting error message using Task Scheduler

Hi, I’m trying to run a testing suite using Task Scheduler and getting an error.

When I run the batch file on its own, it works just fine. But if I try to schedule it using Task Scheduler, I get the following error message:

java.lang.IllegalStateException: The platform metadata area could not be written: C:\Windows\System32\config.metadata. By default the platform writes its content
under the current working directory when the platform is launched. Use the -data parameter to
specify a different content area for the platform.

Is there something I need to edit in the batch file to make this run, or something I need to do differently in Task Scheduler?

No, that’s going to be the permissions under which the batch is executing when sparked up by the Scheduler. Try changing the RunAs setting (can’t recall exactly what it’s called).

There’s a post on here about this - try search (or DuckDuckGo it)

I think this will help you >> task scheduler