cancel
Showing results for 
Search instead for 
Did you mean: 

problem with OS command (post process)

Former Member
0 Kudos

Hello everybody

I'm trying to start a VBScript (.vbs) as a post process OS command from XI. On XI I have an outbound communication channel (file adapter). Everything works fine except that the .vbs script won't run.

When running it manually (double click on the .vbs file) it works.

My post process OS command looks like that:

<b>cmd.exe /C "
myhost.mydomain\myshare\processArjFile.vbs %f"</b>

I'm able to start a .bat file instead, but this is not what I want. I have some coding in the .vbs file that I can't put in a .bat file.

Even starting a .bat file which in turn calls / execs the .vbs file doesn't work.

We're running XI 3.0 SP 16 with Java 1.5.0_09 on a Win 2003 server.

Any ideas how to make it work?

Kind regards,

Renaud

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Renaud,

My suggestion would be to write a batch file where you internally in the file execute the vbs file.

or

Make it as an exe file (if possible) and run the interface again.

---Satish

Former Member
0 Kudos

Thanks Satish for your reply!

Unfortunatley both suggestions don't work. 1st one I already tried before your reply and 2nd one doesn't change anything. It looks like the process waits for some kind of "ok" to really start because on XI communication channel I set a timeout of 300 sec.

When looking at ...\DVEBMGS00\j2ee\cluster\server0\log\applications.0.log I can see (for the try with .exe):

#1.5#001279A59909006E00000055000015E0000427C9EDB67360#1169648136951#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.file.util.OSCommand.exec(String, FileHandle, int, boolean, AuditMessageKey, String)#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : [07bffffffddfffffff60021ffffff92]###5ca81070abb511dbbb4b001279a59909#XI AF XI2File[/DXI/CC_File_receiver]##0#0#Error#1#com.sap.aii.adapter.file.util.OSCommand#Java###Error excuting command - proceed anyway#2#java.lang.InterruptedException: command execution timeout (300 s) exceeded:

myhost.mydomain
myshare
processArjFile.exe GDATHXD.ARJ#

myhost.mydomain
myshare
processArjFile.exe GDATHXD.ARJ# #1.5#001279A599090047000000D5000015E0000427C9FF99FCFA#1169648437088#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.file.util.OSCommand.exec(String, FileHandle, int, boolean, AuditMessageKey, String)#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : [07bffffffddfffffff60021ffffff93]###0f8d5600abb611dbc3b6001279a59909#XI AF XI2File[/DXI/CC_File_receiver]##0#0#Error#1#com.sap.aii.adapter.file.util.OSCommand#Java###Error
excuting command - proceed anyway#2#java.lang.InterruptedException: command execution timeout (300 s) exceeded:

uisla01.insel.ch
dataexch
e-mediat.net
galdat
processArjFile.exe GDATHAD.ARJ#

myhost.mydomain
myshare
processArjFile.exe GDATHAD.ARJ# #1.5#001279A59909005E000000AA000015E0000427CA1181A6EB#1169648737491#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.file.util.OSCommand.exec(String, FileHandle, int, boolean, AuditMessageKey, String)#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : [07bffffffddfffffff60021ffffff98]###c29b3230abb611dbcbc5001279a59909#XI AF XI2File[/DXI/CC_File_receiver]##0#0#Error#1#com.sap.aii.adapter.file.util.OSCommand#Java###Error excuting command
- proceed anyway#2#java.lang.InterruptedException: command execution timeout (300 s) exceeded:

myhost.mydomain
myshare
processArjFile.exe GDATSXD.ARJ#

myhost.mydomain
myshare
processArjFile.exe GDATSXD.ARJ#

#1.5#001279A599090054000000A1000015E0000427CA1EFB6F41#1169648963581#/Applications/SLD#sap.com/com.sap.lcr#com.sap.lcr.security.UserFactory#XIAPPLUSER#2767##nisla01.is002.tss_DXI_8117750#XIAPPLUSER#494ab800abb711dbbe67001279a59909#output##0#0#Info#1#com.sap.lcr.security.UserFactory#Plain###User XIAPPLUSER logged in#

#1.5#001279A599090052000000B6000015E0000427CA23907409#1169649040393#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.file.util.OSCommand.exec(String, FileHandle, int, boolean, AuditMessageKey, String)#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : [07bffffffddfffffff60021ffffff9a]#nisla01.is002.tss_DXI_8117750#Guest#0ada6d60ab9711dbcc31001279a59909#XI AF XI2File[/DXI/CC_File_receiver]##0#0#Error#1#com.sap.aii.adapter.file.util.OSCommand#Java###Error excuting command - proceed anyway#2#java.lang.InterruptedException: command execution timeout (300 s) exceeded:

myhost.mydomain
myshare
processArjFile.exe GDATSAD.ARJ#

myhost.mydomain
myshare
processArjFile.exe GDATSAD.ARJ#

Any other ideas?

Renaud

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks for this one! I'll see what we can do with it next week. Have a great week-end,

Renaud

Former Member
0 Kudos

Hello Satish

> <i>Just when starting it windows asks for permission because

> it is potentially insecure to launch .vbs files.</i>

>

> What do you mean by this? After starting this manually, are

> you entering anything manually?

I mean that when starting the .vbs file manually windows first warns me about execution of potential insecure files. The script only starts after confirming the dialog box with "ok". This dialog box IS NOT part of my script!

When I manually start a .bat file instead the same dialog box pops up.

Because XI's post process OS command is capable to start a .bat file BUT NOT a .vbs file I don't think this dialog box (popping up WHEN MANUALLY starting a .bat OR .vbs file) matters. It must be something else.

> To check whether the .bat file is executing or not, first try

> with a simple command. If this works and when you keep

> the .vbs files if it dont work then we can think that it is

> creating problems. This way we can minimize the

> troubleshooting.

I already tested with a simple .bat file. It is executing!

I even can't imagine about windows user / group account authorization problems (NTFS and/or share authorizations) because .bat and .vbs files are located at the same place with exactly same authorization settings.

This is what should be done via this post process OS command:

- call the script and passing by the filename from XI's file adapter (%f)

- the file is an ARJ archive, so I need to extract its content to a separate sub-directory (this alone can easily be achieved with a .bat file, I tested it and it works)

- to extract an ARJ archive I use "arj.exe"

- then I have to find out the creation or changed date of the first extracted file

- with this date I create a new folder called <yyyymmdd> and move all extracted files to this new folder

I'm not creating this ARJ archive, it is provided by some kind of a "content broker". Thus I have no chance to get an ARJ archive from him containing useful path informations. That's why I have to find a solution on our side.

Furthermore, in a .bat file the CD command doesn't accept UNC paths but I need to work with UNC paths (one more reason why I need to do all this with a .vbs file).

Renaud

Former Member
0 Kudos

Hi..

Please check this OSS note - 841704

Thanks.

Former Member
0 Kudos

Yes, the .vbs file resides on a network share... as well as the .bat file I mentioned in my initial post. And XI is capable to start the .bat file.

I know about JAVA security policy where you have to allow access to network shares / drives... but this seems not to be the issue, else XI wouldn't be capable to start the .bat file.

Anyway, I moved the .vbs files to XI's local drive (c:\temp) and tried it again. Still no luck!

BTW: there are no dialogs in my .vbs script. Just when starting it windows asks for permission because it is potentially insecure to launch .vbs files. BUT THIS ALSO happens when I manually start my .bat file... so where is the difference between a .bat file and a .vbs file from XI's point of view?!?

Still 10 reward points to earn here

Kind regards,

Renaud

Former Member
0 Kudos

Renaud,

<i>Just when starting it windows asks for permission because it is potentially insecure to launch .vbs files.</i>

What do you mean by this? After starting this manually, are you entering anything manually?

To check whether the .bat file is executing or not, first try with a simple command. If this works and when you keep the .vbs files if it dont work then we can think that it is creating problems. This way we can minimize the troubleshooting.

---Satish

Former Member
0 Kudos

are you having the vbs file on a shared drive on a different machine ?

That might be a problem...

can you try copying it to XI's local file system and give that path and see if it would work...

Thanks.