tags:

views:

450

answers:

4

I have an application running only on Windows and a batch file that launches it. I want to invoke this batch file from Linux, meaning something like Linux batch will launch the windows batch with parameters and this in its turn run my application.

Can I do that? How?

+9  A: 

You could install an ssh server in the windows box (Cygwin has one), then from linux do something like:

ssh user@windows-box c:/path/to/batch.cmd

and that should launch your application in the windows box.

dsm
A: 

Our build process currently goes the other way: a windows sever kicks off things on the Linux server using plink (part of PuTTY). You might be able to set something similar up.

Peter K.
A: 

This may cause a security issue. Our information security person did not allow me to invoke any programs directly.

The safer way is to set up server on Windows computer. This can be a web-server for example. And then invoke your process inside PHP/Perl/Python script.

Aleksey Otrubennikov
+1  A: 

The most direct way is probably to install an ssh server on the windows box. Cygwin includes an ssh server.

Depending on how precise your timing needs are, you might be able to have an "at" job on the windows box that runs periodically (every 5 minutes?) and runs if it sees that a particular file exists, deleting the file. Then you could use Samba/smbclient to create the file. You would need to turn on filesharing on the windows box for this to work.

If the windows box has a web server, you could write a CGI, and trigger it using wget or cURL.

Glomek