cancel
Showing results for 
Search instead for 
Did you mean: 

Run remote batch file from Web Application Server

0 Kudos

Hello,

I've developyed a Java program and deployed it on WAS v7.1.

My java program tries to run a remote batch file which is located on remote Windows file system (and not on the WAS file system itself).

The batch file was launched on the remote server (I saw it on the Task Manager of the remote server), but the remote batch file actually wasn't run (it was stuck).

In order to run the remote batch file from my java program that is deployed on the WAS I've created a batch file on the WAS file system which its contnet is:

cd c:\jobs

psexec.exe
iltlvt40 -u SAPServiceCE1 -p a2i2000! c:\automation\DiskSpace\runDiskSpace.bat

My java program calls this batch file using the Runtime.exec() java method in order to run the remote batch file.

Please guide me how to solve this problem?

Best regards,

Ahmad

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi,

To which batch file you have meant to add some commands: for the local one or remote?

I've added to the local one some different commands and it's works.

I think there is a permission problem when we are trying to go out of the WAS file system.

Best regards,

Ahmad

former_member185954
Active Contributor
0 Kudos

I meant the remote one.

Since you said that the remote computer shows the batch file in the task manager.

So i thought if you put some debugging comments like echo statements in the remote batch file then you would be able to diagnose why the batch is not running.

Regards,

Siddhesh

former_member185954
Active Contributor
0 Kudos

Hello,

Why don't you edit the batch file and include some commands that tell you which command is being executed right now.

For example some kind of echo statements saying..

Trying to execute line 1

Regards,

Siddhesh