1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? Run DOS .exe's the same way Wine does...

Discussion in 'Support' started by Joe Caverly, Sep 2, 2014.

  1. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    659
    Likes Received:
    8
    Hi,
    Wine has the ability to determine whether an .EXE is for DOS or Windows. If the .EXE is for DOS, it launches it using DOSBox.

    Ref: (http://jpsoft.com/forums/threads/4nt8-wineconsole-and-dosbox.4208/)

    I would like to do the same under TCC running in Windows Vista.

    I can easily do this with a .BTM file, using the @EXETYPE variable function to determine if the .EXE is for DOS, but I would like to start an .EXE on the command line, just like in 4NT8 under Wine, and have it launch DOSBox if the .EXE is for DOS.

    I was thinking of using Charles Dye's EKeys plugin, but the Enter key is not a supported hotkey (if it is, I must have missed it).

    Constructive suggestions would be appreciated.

    Joe
     
  2. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,188
    Likes Received:
    11
    One way would be to run all your exe's via a "run" type command. You could then check your @exetype within the launcher.
    Maybe something like:
    Code:
    alias r*un=`if %@exetype[%1] == 1 (dosbox %$) else (%$)`
    
    r mydoscmd
    r regcmd
    
     
  3. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,188
    Likes Received:
    11
    It might be possible to use the PRE_EXEC alias to do that also. I haven't ever used the special aliases so I don't have experience with them. The docs say they aren't passed a command line. So I don't know how you get the current command line.
     
  4. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    659
    Likes Received:
    8
    I created a .BTM called pre_exec.btm;
    Code:
    @setlocal
    @echo off
    set theEXE=%@word[0,%_cmdline]
    echo %theEXE
    endlocal
    Next, I did;
    Code:
    alias pre_exec=c:\utils\pre_exec.btm
    which returns the command line.

    I'll see where this takes me.

    Joe
     

Share This Page