Prevent Wine from Opening Dialog Boxes

Questions about Wine on Linux
Locked
wineUser8210
Newbie
Newbie
Posts: 2
Joined: Fri Aug 18, 2017 10:33 am

Prevent Wine from Opening Dialog Boxes

Post by wineUser8210 »

I'm using wine to run a command line application in parallel on 48 cpus. Unfortunately, cross-compiling the application for Linux is not an option.

I learned that each parallel instance needs its own wine prefix. So I run the executable like this:

WINEPREFIX=$PWD/.wine /pathToWine/wine ./myExecutable

I also learned that the wineservers need to be explicitly shutdown after the application exits. I did that like this:

WINEPREFIX=$PWD/.wine /pathToWineServer/wineserver -k

At this point, the application runs successfully in parallel. Under rare circumstances though, the application produces an error and wine displays that error in a dialog box that must be closed by clicking "okay". If a single instance of the application is run, this is not a problem. However, when 48 instances of the application are run, 48 dialog boxes appear and that's undesirable. Is there a way that I can prevent Wine from opening those dialog boxes?
User avatar
dimesio
Moderator
Moderator
Posts: 13205
Joined: Tue Mar 25, 2008 10:30 pm

Re: Prevent Wine from Opening Dialog Boxes

Post by dimesio »

If the dialog box you're talking about is Wine's crash dialog, that can be disabled with winetricks nocrashdialog. If it's a dialog from the app itself, you may or may not be able to do anything about it. If it's a separate executable producing it (e.g., dw20.exe is the crash handler for Microsoft Office apps), you can disable that in winecfg.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Prevent Wine from Opening Dialog Boxes

Post by Bob Wya »

@wineUser8210

If it's a dialog box from the application - then you can also potentially run a background AutoHotkey / AutoIt script.
A script can easily be written to delete the dialog box and restart the application (if necessary).
Basically as long the background wineserver process is intact - you are golden!

For reference the winetricks script uses AutoHotKey to do it's magic sauce with Windows installer GUI's...
For native Windows automation tasks these utilities are essential!

Bob
wineUser8210
Newbie
Newbie
Posts: 2
Joined: Fri Aug 18, 2017 10:33 am

Re: Prevent Wine from Opening Dialog Boxes

Post by wineUser8210 »

Thank you for your responses! It may be a little while before I'm able to try your suggestions, but I will report back when I do. I'm glad that there may be a solution.
Locked