5

I cannot find documentation for how winetricks or winecfg create permanent exe overrides. I also would like to set desktop integration and windows version from the shell.

The reason for this is that I am testing a difficult program. It installs correctly sometimes, but not others. Tracking down the exact problem has led me to re-create a wine-prefix for it upwards of 10 times a day. It is simply not practical to use the GUI for that. I need to know the commands/options I can pass to winecfg/wine/winetricks so that I can create the initial prefix faster.

Is there any documentation for: set permanent exe override or set desktop integration paths or set windows version ? I appreciate any help with any of those three things!

2 Answers2

5

Just like Windows does, everything in Wine is configured through the registry. Every single settings winecfg access can also be accessed through the registry using the regedit utility, which can also be used in command line to either import a big .reg file or set individual keys on the command line itself.

All the used keys are in the Useful Registry Keys wiki page.

The easiest option in your case would be to export the configuration in a .reg file (right click on the keys you need, export) and then import then with wine regedit MyConfig.reg in your auto-configure script. You can write the .reg manually as well if you want, it's just a .ini-style text file.

Edit: wanted to add that as a comment as it doesn't answer the question itself but suggest another way of doing it but I lack reputation here: I'd recommend to just create a full copy of your clean pre-installation prefix and just copy it back when you need to reset. You will avoid the whole script to reconfigure a clean prefix, and will also be much faster than reinstalling libraries through winetricks and running regedit as all its a disk only operation.

Max-P
  • 206
0

To change Windows version using Winetricks, you can run:

winetricks -q win10

Available options are: nt351, nt40, vista, win10, win11, win20, win2k, win30, win31, win7, win8, win81, win95, win98, winme (basedon Wintricks source code).

kenorb
  • 26,615