Run windows batch file from unix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pankaj1
    New Member
    • Nov 2006
    • 3

    Run windows batch file from unix

    I want to run a batch file in windows from unix. We can establish a connection to windows server from unix using ftp mode. But through ftp mode, only files can be transferred.
    I have a file called file.bat in my desktop. I want to run that batch file thru my shellscript program in unix.
    Kindly help me on this.
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    You would need to get onto the system after the file was transferred - use the Linux Remote Desktop program or something similar to connect and manually execute it, or create a scheduled job in Windows that looks for that file and executes it when found.

    Comment

    • pankaj1
      New Member
      • Nov 2006
      • 3

      #3
      I want it to be automated. Can this be done using secured login comand ssh?

      Comment

      • jabbah
        New Member
        • Nov 2007
        • 63

        #4
        I want it to be automated.
        what precisely do you want to automate. can you describe the intended workflow?

        is sicaries tip not the answer to your problem?
        create a scheduled job in Windows that looks for that file and executes it when found.
        regarding ssh:
        Can this be done using secured login comand ssh?
        if you install a ssh server on your windows machine then you can connect to it with ssh and you can execute console programs on the windows machine. it's been a while that i used that, but cygwin sshd worked well for me.

        btw, an ssh server should relieve you from needing an ftp server (which, i beliebe, transfers the passwords in plain text, which is a bad thing) since you can use sftp,scp then.
        Last edited by jabbah; Jan 13 '12, 03:57 PM. Reason: overlooked sicaries answer at first

        Comment

        Working...