Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What's the best to remote execute Windows Batch?

 
Tony Tranquil
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Web-App is running on the *nix box, this app needs to execute Window Batch remotely. Could you please let me know what's the best way to do it?

Thank you in advance
 
Jeff Storey
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony,

If you can, a good way to do this would be to run a process on the same machine as the windows batch file that accepts incoming requests to execute it. This could receive requests over any sort of network protocol - tcp, udp, soap, etc. Then this application would receive a request from your web app, and it would execute the batch file locally. This separates your webapp's request code from knowing the details that it is executing a batch file -- it is just sending a network request to do something. This will help with testability and also allow you to expand in the future. For example, you could change so it is not a batch file, but some other process executing and your webapp would never even know.

Jeff
 
Tony Tranquil
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank Jeff!

I did some research. As we've know there are some utility libraries like j2ssh/jsh/jrexec, these libraries provides functionalities like telnet to UNIX box. I'd like to know if there is any libraries for *NIX to 'TELNET' Windows box?

Thanks
 
Jeff Storey
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I can't say I'm familiar with any -- good luck!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic