Passing arguments to windows .exe

Discussion in 'Windows Virtual Machine' started by FilipJ, Mar 1, 2014.

  1. FilipJ

    FilipJ Bit poster

    Messages:
    1
    Hi all,

    I'm trying to launch a windows application from terminal. I have a symlink 'dymola' to 'dymola.app'. Clicking these links in finder will open Dymola. The following command in terminal also works:
    > open /path/dymola

    Dymola can also be launched with the argument /nowindow, which I can get to work as follows:
    > open /path/dymola --args /nowindow

    Now I want to open a file x.mos which I can do as follows:
    > open /pathtofile/x.mos -a /path/dymola

    The problem is that when I now try to pass the /nowindow argument it gets passed to x.mos instead of dymola, which is causing me problems.

    My question: how can I pass this argument.. I already tried some things:
    1) making a new link in windows containing: dymola.exe /nowindow -> I created a parallels .app file and symlink dymola-nowindow
    > open /path/dymola-nowindow
    -> LSOpenURLsWithRole() failed with error -10810 for the file /path/dymola-nowindow.
    2) tried looking into dymola.app to see whether I can manually insert the argument there -> no luck
    Is there a way to pass arguments to winapphelper?
    3) Tried making a dummy exectuable 'nowindowhelper' containing: "open /path/dymola --args /nowindow"
    > open ~/pathtofile/x.mos -a /path/nowindowhelper
    -> LSOpenURLsWithRole() failed for the application /path/nowindowhelper with error -10811 for the file /pathtofile/x.mos.

    The cleanest way seems to be option 2 where I could manually add the argument in one of Parallels links. Similar things have been suggested here:
    http://forum.parallels.com/showthread.php?6918-Give-us-a-hint-Parallels-Team
    http://forum.parallels.com/showthread.php?19445-Launching-URL-in-Windows-from-OSX-from-commandline

    I hope someone can help me out here!

    thanks!
     

Share This Page