cancel
Showing results for 
Search instead for 
Did you mean: 

Running an External Program from Batch on Windows Server 2008R2 Failing

neil_hoff
Participant
0 Kudos

Hi,

I am trying to run an external program from a batch job and it is failing with this error message:

Ext. prog.: ERROR: Input redirection is not supported, exiting the process immediately.

Ext. prog.: External program terminated with exit code 1

The program I am trying to run is: timeout

This command works on the OS: timeout -t 30

I have setup the step to look like this:

Under External Program:

-Name: timeout

-Parameter: -t 30

I have also tried:

-Name: timeout -t -30

-Parameter:

I am running ECC 6.04 on top of Windows Server 2008R2 with SQL Server 2008R2.

When we were running in Server 2003 on ECC 6.0 I was able to use the Sleep program just fine in the same manner. I have found out that sleep is not available in server 2008. It was replaced with timeout.

After an update to EHP4 and moving to Windows Server 2008R2, Is there any pre-work that needs to be done on the SAP or Windows side before we can run external programs?

Thank you,

Neil

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try to create a one line .bat script file containing the command and use it as your job step.

It may work if this the "-t 30" which is interpretated as a security risk.

Regards,

Olivier

neil_hoff
Participant
0 Kudos

Hi Olivier,

I have created the windows .bat file with the command in it and I am still getting the same error.

Thank you,

Neil

neil_hoff
Participant
0 Kudos

The error message is actually correct for this command line program: timeout -t -30

You cannot run this program through SAP.

We were able to get what we needed by creating a program in C# that just waited for 30 seconds. When this runs in a batch job it works perfectly.

markus_doehr2
Active Contributor
0 Kudos

Does the user SAPService<SID> have the permission/policy to "interact with the desktop"?

Markus

neil_hoff
Participant
0 Kudos

Hi Markus,

SAPService<SID> and <SID>ADM both have Administrator rights for the server.

That means they should have full access.

Where would you setup the permission/policy to "interact with the desktop"?

Thank you,

Neil

markus_doehr2
Active Contributor
0 Kudos

> SAPService<SID> and <SID>ADM both have Administrator rights for the server.

> That means they should have full access.

No - this is no more true like that since Windows 2008, it's a bit more complex:

http://en.wikipedia.org/wiki/User_Account_Control

> Where would you setup the permission/policy to "interact with the desktop"?

Add the policy using group policy editor (gpedit.msc)

Markus

neil_hoff
Participant
0 Kudos

Hi Marcus,

I am looking in the group policy editor (gpedit.msi) and I cannot find the permission/policy to "interact with the desktop" anywhere.

I have also searched Google without any luck.

How do you add this?

Thank you,

Neil