Unix/Linux Go Back    


Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here!

Start windows application (.bat) from Unix

Windows & DOS: Issues & Discussions


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 06-13-2012   -   Original Discussion by pkan
pkan's Unix or Linux Image
pkan pkan is offline
Registered User
 
Join Date: Apr 2009
Last Activity: 13 June 2012, 3:46 PM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Start windows application (.bat) from Unix

How can I start an application sitting on a windows machine (XP) from Unix shell script (AIX server) ?
Sponsored Links
    #2  
Old Unix and Linux 06-13-2012   -   Original Discussion by pkan
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 9 December 2017, 8:47 PM EST
Posts: 8,945
Thanks: 380
Thanked 1,238 Times in 1,052 Posts
Do you want the long answer, or the short one?
Sponsored Links
    #3  
Old Unix and Linux 06-13-2012   -   Original Discussion by pkan
pkan's Unix or Linux Image
pkan pkan is offline
Registered User
 
Join Date: Apr 2009
Last Activity: 13 June 2012, 3:46 PM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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 Unix and Linux 06-13-2012   -   Original Discussion by pkan
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 9 December 2017, 8:47 PM EST
Posts: 8,945
Thanks: 380
Thanked 1,238 Times in 1,052 Posts
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?
Sponsored Links
    #5  
Old Unix and Linux 06-13-2012   -   Original Discussion by pkan
joeyg's Unix or Linux Image
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Last Activity: 28 November 2017, 8:06 AM EST
Location: Within two miles of a Dunkin donuts.
Posts: 2,468
Thanks: 133
Thanked 194 Times in 175 Posts
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
Sponsored Links
    #6  
Old Unix and Linux 06-13-2012   -   Original Discussion by pkan
methyl's Unix or Linux Image
methyl methyl is offline
Registered User
 
Join Date: Mar 2008
Last Activity: 8 June 2016, 9:58 PM EDT
Posts: 6,402
Thanks: 288
Thanked 676 Times in 645 Posts
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!
Sponsored Links
    #7  
Old Unix and Linux 06-13-2012   -   Original Discussion by pkan
sandholm's Unix or Linux Image
sandholm sandholm is offline
Registered User
 
Join Date: Dec 2007
Last Activity: 11 November 2012, 5:59 AM EST
Location: New Hampshire
Posts: 27
Thanks: 0
Thanked 2 Times in 2 Posts
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.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
startX windows application during boot.....putty connection takes the windows venkat_330 UNIX for Dummies Questions & Answers 1 07-13-2011 11:45 AM
To access UNIX server from Tk application running on Windows ratneshnagori Shell Programming and Scripting 1 04-13-2010 04:51 AM
how to start a c++ exe on unix from windows. ch5082 Programming 5 09-16-2007 06:05 PM
Executing application on Windows from Unix machine MobileUser UNIX for Dummies Questions & Answers 3 07-12-2007 05:47 PM
start windows appl. from unix Dplancke UNIX Desktop Questions & Answers 9 07-24-2005 03:12 PM



All times are GMT -4. The time now is 11:08 AM.