# [Solved] Opening a file with an .exe inside Lutris?

Hello!

I am trying to open a file with a game’s .exe in one of my lutris games.
Specifically, I am trying to open a saved game replay in World of Tanks, which you are supposed to do by dragging the file on the game’s exe, which will not work here since this is wine.
https://eu.wargaming.net/support/en/products/wot/article/10411/

Now, I assumed you can probably achieve the same by passing the file as a command line argument, eg. worldoftanks.exe path\to\my\file.wotreplay

I am not sure about the right way to do this for Lutris though, since besides the custom wine location and prefix location I also need it to start with DXVK, Esync and multiple environment variables. Is there a “good” way to do this? Would be really happy about advice on how to proceed.

If it’s a matter of adding a parameter to your executable, it’s quite easy to do really. Just add it to the arguments list; it should get appended to the end of Wine arguments, and will thus be directly passed to the executable. Make sure to wrap the path either in double (") or single (') quotes if it contains spaces, otherwise it’ll think you’re passing multiple arguments.

The only downsides here are that a) you have to use location in the wineprefix (so either put the file somewhere in the drive_c of the wineprefix or use full system path starting with Z: – exact set of disk to folder mapping can be found/configured in “Wine configuration” dialog; and you may have to replace slashes with \\ – or \ if you wrap the path in ' quotes), and b) you’ll have to remove it by editing config again to start the game normally.

In cases where the executable isn’t that of the game itself (i.e. the one configured by Lutris to run), you’d want to use a tool like Q4Wine to manage additional executables (you’d have to register the Wine version used by Lutris in it as well as the prefix, naturally), but if you need to have stuff like DXVK and Esync enabled (which is usually only needed for the game itself) you’ll have to find out how to enable them in Wine itself (most likely by adding something to the environment variables list), so if the only thing you need to do is pass an argument to the game once it’s easier to just do it through Lutris and revert the config after you’re done.

1 Like

Ah I did not think of adding it to the executable field, that’s a better workaround
Would be even nicer if this was a proper feature though. Or perhaps the ability to associate file endings with Lutris executables, as PlayOnLinux allows it. Would also enable non-game windows applications that work on specific files. Perhaps I can open an issue for that, if it doesn’t already exist

Lutris is a videogame manager. It’s a program to run videogames.

And except for the rare case of the game devs being especially quirky (or rather, lazy), you don’t use videogames to open files. A proper videogame exists in vacuum, as an entity on its own (and if it operates some files, those are files belonging to the game and within its own microcosm). Thus, Lutris doesn’t really support stuff like “opening a file with a videogame” or “associating a file type with a videogame”.

And for the cases where you need to work with utility software (designed to open external files), there’s dedicated managers like Q4Wine which I mentioned earlier.

P.S. It’s the Arguments field, not Executable. If you add the argument inside the executable field, Lutris will think it’s part of the file path, and Wine won’t be able to find the file.