IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

How to execute EXE from IS

  • 1.  How to execute EXE from IS

    Posted Thu December 13, 2012 08:10 PM

    We have an executable program that I would like to IS to execute. Also, I will have to pass one input parameter to the program. Is this possible out-of-the-box?


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: How to execute EXE from IS

    Posted Thu December 13, 2012 09:57 PM

    In 8.x you can use pub.utils:executeOSCommand.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: How to execute EXE from IS

    Posted Fri December 14, 2012 02:15 PM

    Thanks reamon. I’ve looked at that one and thought it was to execute DOS command but I suppose to see if it can execute a VB.NET program. Hopefully, the build-in service guide have some good documentation on how to use it.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: How to execute EXE from IS

    Posted Fri December 14, 2012 02:40 PM

    Proceed with caution. If the program called misbehaves it can take down the IS JVM.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: How to execute EXE from IS

    Posted Fri December 14, 2012 02:59 PM

    Understood. For some reason, I’m not doing something correct. I tried executing the service and receive an error stating the syntax is incorrect. I’ve updated the OSCommand.cnf file as well. Can you try to see if you can get a directory listing for a certain directory?

    Input parameter:
    command = cmd.exe /c dir
    working directory = c:/temp


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 6.  RE: How to execute EXE from IS

    Posted Fri December 14, 2012 03:46 PM

    I believe you should input command as for example unix scenario

    sh fullpathof.sh file (can you try that exe file under the IntegrationServer folder and execute?)

    HTH,
    RMG


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: How to execute EXE from IS

    Posted Fri December 14, 2012 04:52 PM

    I can’t seem to find it again but I recall seeing info that “in memory” commands such as dir, time and others do not work when shelling out using cmd.exe. It needs to be an “on-disk” command to work. I remember doing this a year a so ago and found it quite odd.

    Keep in mind too that no path will be set (if memory serves) so you’ll need to address that in some way. Particularly for .net stuff which undoubtedly will need 100 different DLLs to do Hello World. :wink:

    You may also want to use the /d switch.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 8.  RE: How to execute EXE from IS

    Posted Fri December 14, 2012 07:03 PM

    I’m running IS in Windows so performing unix like scenario is not going to work. I’ve escalated this issue with SAG and lets see what they have to say. The example that I’m using is straight out of the IS built-in services guide.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: How to execute EXE from IS

    Posted Fri December 14, 2012 07:11 PM

    Sorry I didn’t meant to use unix scenario :slight_smile:


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services