Start windows application (.bat) from Unix

 
Thread Tools Search this Thread
Special Forums Windows & DOS: Issues & Discussions Start windows application (.bat) from Unix
# 1  
Old 06-13-2012
Start windows application (.bat) from Unix

How can I start an application sitting on a windows machine (XP) from Unix shell script (AIX server) ?
# 2  
Old 06-13-2012
Do you want the long answer, or the short one?
# 3  
Old 06-13-2012
Long answer is preferred. Even if you can point to a link ..that's fine. Thanks. I can't seem to find a way to start .bat file
# 4  
Old 06-13-2012
The long answer goes "you really can't".

(for completion the short one says "you can't").

But perhaps you're interested in converting some ".bat" code into ksh?
# 5  
Old 06-13-2012
Maybe a way to cheat the rules

Are you familiar with PC Windows?
Read up on scheduling tasks (accessories, system tools, scheduled tasks)
[note, some versions of windows might be a bit different to get there]

Create a scheduled task to run some 1.bat file
In normal operation, this 1.bat file will do no work

Now, on unix, create a text file of your 1.bat file to run on Windows
ftp it to your PC
Now, at the next scheduled execution, it will run.

Some things to think about:
may want to create a 2.bat
have the last line of 1.bat call 2.bat
but, the 2.bat file deletes the 1.bat file you just moved and ran once
AND, makes the 1.bat into its do-nothing original format
# 6  
Old 06-13-2012
Worth reading up on Microsoft SUA (Subsystem for Unix Applications) and SFU (Services for unix).

A quick Google of your keywords picked up this site (no endorsement or warrany implied, but quite a good read):
How to run a Windows BAT file from rsh command from UNIX (AIX) ?


Hmm: This is a classic case of someone presenting us with a solution "start .bat file" without presenting the problem or any information about the application (like whether it needs KVM) or the version of AIX.


I have written a unix Script to upload and run a Batch File on a Windows 2003 Server without any special software and just armed with my own Windows account username and password. This is such a horrendous security hole that I will not publish the method on the Internet even though I read it in a "tips" book!
# 7  
Old 06-13-2012
Yes it is possible

I've done this before.
I installed cygwin on the target windows machine, configured sshd and exchanged keys with the remote Unix server.
Then used ssh to access the windows machine from Unix and then you may start the application.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

How can I start a cygwin application from windows 7 command prompt?

I have compiled an application called tmesh.exe, that was compiled for the cygwin, win7 platform. I wonder, if I do that outside X window, Is there a chance that I can run it on the command prompt of windows 7? (tmesh:4048): Gtk-WARNING **: cannot open display: THANKS Jack (3 Replies)
Discussion started by: lucky7456969
3 Replies

2. Shell Programming and Scripting

To access UNIX server from Tk application running on Windows

Hi, I am new to this forum and this is my first post. I want to know that if I make an application in Tk (version of Tcl to create GUI) in windows and want to run to UNIX server, is it possible ? In other words, can I access a UNIX server through a Tk application running on windows ? ... (1 Reply)
Discussion started by: ratneshnagori
1 Replies

3. Windows & DOS: Issues & Discussions

bat file opening multiple IE windows

I'm trying to open multiple IE windows and enter the same text and press <enter> on each. Here's an example with what I have so far. REM Open @echo on start http://10.1.1.1 ping 1.1.1.1 -n 5 -w 1000 >nul @echo password start http://10.1.1.2 ping 1.1.1.1 -n 5 -w 1000 >nul @echo password... (2 Replies)
Discussion started by: Pitt
2 Replies

4. UNIX for Advanced & Expert Users

help needed to connect to windows from unix and run .bat file

Hi Can anyone tell if it is possible to connect from Unix to t a remote windows environment and run a .bat script. Do SSH/SFTP... serve my purpose..if s how.... if not which commands or scripts will help with my requiremnt. points on this are greatly honoured. Thanks in advance. :) (1 Reply)
Discussion started by: lakshmis10
1 Replies

5. Programming

how to start a c++ exe on unix from windows.

I'm very new to c++ & unix programming. I have a c++ exe that runs on the unix box, but I am trying to write a c++ windows app that executes the program on unix. I have tried execv(), but it doesn't seem to work or I'm doing something wrong. Would really like to see examples if at all possible. ... (5 Replies)
Discussion started by: ch5082
5 Replies

6. UNIX for Dummies Questions & Answers

Executing application on Windows from Unix machine

I have two machines, one running Windows and another one Unix over a network. I want to execute a batch file on the Windows machine using a script running on the Unix machine. I have tried creating a rsa key and transferrring it to the destination machine but it doesn't work. The purpose was to... (3 Replies)
Discussion started by: MobileUser
3 Replies

7. UNIX for Dummies Questions & Answers

Q about windows bat files

Hi, can you run a windows bat file or a VBscript from a shell script? #!/bin/sh PATH=/ $PATH/test.bat (1 Reply)
Discussion started by: cmac
1 Replies

8. Windows & DOS: Issues & Discussions

Urgent Need for Assistance: Triggering Windows bat files from UNIX

Hello, Is there a way to trigger a Windows bat file or program on a different machine from a different UNIX server using KSC file? I hope you can assist me with this. Thanks! (0 Replies)
Discussion started by: punyenye
0 Replies

9. Shell Programming and Scripting

executing *.bat file on windows from Unix box via ftp command

I have created get_list.bat file containing following line: dir /B /O-d >file_list.txt I am executing ftp command from Unix box and transferring get_list.bat file to windows server. In my next ftp command I am trying to execute this test.bat file by entering this line: get_list or by... (9 Replies)
Discussion started by: alx
9 Replies

10. UNIX Desktop Questions & Answers

start windows appl. from unix

Is it possible to start a windows applications such as mail merge in word from a unix machine (sco-unix, digital osf). Why to do this ? Most people known word to create nice documents, but we want to print this documents with our information (name, adresses etc.. like a mailing. This info... (9 Replies)
Discussion started by: Dplancke
9 Replies
Login or Register to Ask a Question