• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Web service programming

5.00 star(s)

NotAllThere

Permie Swiss
Moderator
Thanks received
2,403
I need to run a .bat file on a remote windows server. I can do it, I think, from unix using e.g. rsh -l user_name windows_host_name "C:\blah\trigger.bat". However, I'd get this all to work by consuming a webservice on the windows server.

I guess I'd have a program (a dll?) running on the windows server that when it receives the request, runs the bat file.

Is there any language that would be particularly suited to this task?
 
Does it need to run from a user action or can you schedule it under the 'at' command?

It can't be scheduled. It'll be triggered from the remote system.

The full process is:

Two servers - one Windows running a bespoke legacy windows application, one Unix running SAP. The windows app generates data which is passed to the unix server's directories. SAP detects the arrival of the file, and does some processing. At the end of that processing, the .bat file must run on the the Windows server. It's the last step I want to automate. (at the moment, some chaps in India monitor the SAP process and send an email when it's finished).

I want to use a web service as it is an easy way for one system to call another, without having to worry unduly about technologies in between.
 
This can easily be consumed within a WCF service. Are you in control of permissions on the windows box? as the account the app pool runs under will need access to the bat file.
 
It's been decided that a web service is the best way forward - allow access to all sorts of other applications. WCF looks promising.
 
I believe rsh is being phased out as it's insecure. Installing sshd on Windows is trivial.

Feck me.

It was banned for being insecure at the place I was in 15 years ago.

Passwords in the clear, among other sins, if I remember correctly.

Warning from a decade ago

RSH is convenient, but it has some serious security shortcomings. Like Telnet and FTP, RSH traffic is passed as clear text. If you connect to a server via rlogin and su to the root account, you're sharing that root password with anyone who happens to be listening in on your traffic.
 

Advertisers

Back
Top