0

I have a Java application which uses CMD to execute a .bat file which creates a file after it runs. The script gets executed successfully in windows 2012, but not in windows 2016! I have granted "Log on as a batch job" user right on both Windows Servers.

In win2016: -If no credential is supplied then the script is run successfully but throws out error that the output file is being used by another process!

-If credential is supplied and if the credential is either domain admin or a local admin, the script does not execute and throws out error 0; also, Windows event log shows cmd error.

-If the credential is supplied as the built-admin, the script is ran successfully without any issue.

What am I missing here? anyone have any idea?

1
  • What API does this application use exactly? Edit your question instead of submitting a comment – Ramhound Apr 5 '19 at 2:40
1

GPO policy for UAC was not configured correctly. It needs the following:

-User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode – Elevate without prompting

-User Account Control: Run all administrators in Admin Approval Mode – Disabled

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.