Skip navigation

Opening a wine .exe using automator?

4536 Views 9 Replies Latest reply: Apr 8, 2012 6:11 PM by dhilung RSS
ryuzog Calculating status...
Currently Being Moderated
Oct 21, 2010 3:33 AM
I'm trying to use terminal to open an exe using wine.

the command "wine program.exe" doesn't work though

the command wine isn't recognized.
Mac OS X (10.6.4)
  • Klaus1 Level 8 Level 8 (43,440 points)
    Currently Being Moderated
    Oct 21, 2010 5:02 AM (in response to ryuzog)
    I don't know what 'wine' is, but .exe files are normally Windows executable files, so you need to run Windows to open them.
    20" 2.1GHz iSight iMac G5,, Mac OS X (10.5.8), iLife 9 but iMovie 6, QTPro 7.6.6, Safari 5.0.2
  • jsd2 Level 5 Level 5 (6,200 points)
    Currently Being Moderated
    Oct 21, 2010 5:56 AM (in response to ryuzog)
    Wine is not part of OS X. I hadn't heard of it before, but I found this tutorial:
    [Installing Wine on Mac OS X|http://davidbaumgold.com/tutorials/wine-mac>

    Have you already done this? If not, it is evident from the article that installing Wine on a Mac is highly technical, and unless you are very comfortable with Unix, I wouldn't attempt it. As mentioned there, if you want to run Windows programs the mainstream options are Boot Camp, Parallels Desktop, and VMware Fusion.
    Mac Mini, Mac OS X (10.6.4)
  • jsd2 Level 5 Level 5 (6,200 points)
    Currently Being Moderated
    Oct 21, 2010 8:02 PM (in response to ryuzog)
    Sorry, the situation wasn't clear to me from your first post. You said there, "I'm trying to use terminal to open an exe using wine... the command wine isn't recognized." This seemed to indicate that Wine was never installed! Did you mean to say "I'm trying to use Automator to open an exe using wine?"
    .
    .


    In terminal I'd usually follow with:
    wine fg706p.exe
    and the program starts.

    In automator however the error "wine command not found" pops up.


    Hopefully there are others here who can help further with running shell scripts in Automator, and you could also ask at the [Unix forum|http://discussions.apple.com/forum.jspa?forumID=735] here. My only thought would be to try using the full path to the wine command - so if wine is in /opt/local/bin/, you could cd to the Program Files directory and then use
    --------------------------
    /opt/local/bin/wine fg706p.exe
    -------------------
    Mac Mini, Mac OS X (10.6.4)
  • red_menace Level 6 Level 6 (14,275 points)
    Currently Being Moderated
    Oct 21, 2010 9:51 PM (in response to jsd2)
    You are correct. The *Run Shell Script* action uses a default shell, so if the command isn't installed in one of the default PATHs, it won't be found. General practice is to use full, properly escaped paths, and don't rely on any user environment settings.
    MacBook Pro, Mac OS X (10.6.4), (and various older stuff keeping dust off the shelves)
  • jsd2 Level 5 Level 5 (6,200 points)
    Currently Being Moderated
    Oct 22, 2010 8:04 AM (in response to red_menace)
    Thanks!
    Mac Mini, Mac OS X (10.6.4)
  • Gerhman Calculating status...
    Currently Being Moderated
    Dec 26, 2010 6:01 AM (in response to jsd2)
    If I save "/opt/local/bin/wine filename.exe" as a app using applescript I can then set it as the default app to open a .exe, but what can I replace "filename.exe" with to represent the filename and path of the exe I am trying to open?

    Please help I don't want to use long terminal command every time I want to open a exe, I also don't want to create separate app's to open my exe's, I want to be able to double click my exe and run it in wine.

    PS I don't want to spend any money on this.
    Mac OS X (10.6.5)
  • dhilung Calculating status...
    Currently Being Moderated
    Apr 8, 2012 6:11 PM (in response to Gerhman)

    Create an Automator app using following applescript and set that app as the default app to open .exe files.

    on run exeFile

              try

           do shell script "/opt/local/bin/wine " & POSIX path of (exeFile as text) &" &"

              end try

    end run

     

    hth.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.