leponceau.org

Programming And Stuff, You Know The Thing…

Wine Tricks And Tips

Posted at — Feb 7, 2019

The following has been tested with Wine 4.0 on Ubuntu 18.04. Wine has been backported pretty far, so make sure you visit WineHQ to get a recent distribution of it.

Getting Proper Exit Codes

If you have problems getting proper exit codes from executing Windows programs, try this:

wineconsole cmd /C your-command

Making Copy And Paste Work

wineconsole --backend=curses

Setting Up Environment Variables

In wineconsole do:

reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
reg delete "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" \
    /v JAVA_HOME /f
reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" \
    /v JAVA_HOME /t REG_SZ /d C:\jdk /f

This is also where you set the PATH environment variable.

Or use regedit.