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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Running windows command

    Posted 07/21/10 12:57 PM

    Hi,
    Is there a way to run a DOS command on a windows machine(Say MachineX)
    from another remote windows machine(Say MachineY). But only MachineY
    has webMethods installed. Using the webMethods on MachineY, I want to
    run a command on MachineX which doesn’t have webMethods.


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


  • 2.  RE: Running windows command

    Posted 07/21/10 03:18 PM

    i think the solution should refer to java programming and implement that on webMethods


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


  • 3.  RE: Running windows command

    Posted 07/21/10 11:41 PM

    You can use [url]Microsoft Learn: Build skills that open doors in your career which will let you execute a command on a remote host.

    If you need to execute this from IS, you need to code a Java service to call PsExec with proper parameters, and psexec will do the rest for you.


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


  • 4.  RE: Running windows command

    Posted 07/22/10 01:36 PM

    Devnull43 thankyou.

    Im using the command “psexec \machine1 -w F:\webMethods F:\webMethods\IS2\cmdexe.bat”

    where machine1 is remote machine and
    F:\webMethods is working directory
    and F:\webMethods\IS2\cmdexe.bat is a batch file which has a command.

    When im running this command from my local machine im able to run it successfully but when I use webMethods it doesn’t work.

    From webMethods im using the service PSUtilites.misc:makeSystemCall and
    feeding this sevice with the above command i have mentioned. But the
    service runs continuously and doesn’t terminate.

    Any suggestions?


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


  • 5.  RE: Running windows command

    Posted 07/23/10 12:37 AM

    You got it running from local machine, so that’s first target… congrats.

    Now you need to execute a syscall from IS, and you choose to use PSUtilities package.
    I’m not familiar with makeSystemCall service, but probably you need to pass some environment variables needed by psexec. You are almost sire getting an error from the call as psexec cannot find path for needed libraries.

    Get some documentation on makeSystemCall service, and you will end up running all.

    Good luck!


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


  • 6.  RE: Running windows command

    Posted 07/30/10 06:34 AM

    Hi devnull thanks for the motivation…

    I tried implementing it using ‘psexec’ but it did not work out as expected. anyway I found out why my service was not terminating when called from webMethods. That was because when the service calls the command ‘psexec’ the service should in return accept the EULA of the program PSTools, but webMethods doesn’t know how to accept the EULA. So I went thru some microsoft forums and found out a switch to be added to the command to accept the EULA, so now the command becomes…

    psexec -accepteula \machine1 -w F:\IntegrationServer F:\IntegrationServer\packages\napster\cmdexe.bat

    But somehow even this did not work out as expected. So gave up on this approach.

    My second approach was simple and effective. I just mapped the shared drive from remote system to my local machine using the command ‘net use’ from webMethods(which is on local machine). Now I ran the command on the mapped drive to get what I wanted. :cool:

    The ‘psexec’ command works like a charm when used from my local machine without involving webMethods!!


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