0

I would like to execute a batch file in remote machine using PSExec and the folder is having all required permissions(Modify, Read, Execute and Write). But in remote machine im getting access denied.

Bat script in remote machine: "%JAVA_HOME%\bin\"java -classpath xxxx

Please let me know your thoughts

user2170172
  • 81
  • 2
  • 10
  • It is working fine with admin priviliges – user2170172 Nov 05 '13 at 16:42
  • Can you have your process open a command prompt with admin privileges and then try running the batch file? – Darth Continent Nov 05 '13 at 16:43
  • 2
    The makers of PsExec are saying it doesn't work without local administrator privileges in remote machine. Read the last three paragraphs from [here](http://windowsitpro.com/systems-management/psexec) – MC ND Nov 05 '13 at 16:53
  • When you say it is working fine with admin privileges, are you referring to domain admin account or local admin account? – Chelseawillrecover Nov 05 '13 at 21:06
  • Thanks for comments. Admin priviligers are there in local machine. Remote machine is test server and cant provide admin priviliges to all user. After giving admins privliges in both(local and remote) it works fine and doesnt work with admin access in local machine(dont have admin access in remote this machine) – user2170172 Nov 06 '13 at 12:57

1 Answers1

0

You can use the command runas

runas /user:administrator "your_directory\your_file.bat"

If the build in administrator account doesn't work, you can try another account with admin privileges.

nt314p
  • 13
  • 5