Dump / save settings from an existing Wine Prefix...

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
sweet
Newbie
Newbie
Posts: 2
Joined: Tue Sep 19, 2023 3:37 pm

Dump / save settings from an existing Wine Prefix...

Post by sweet »

Is there anyway that I can dump the settings of an existing wine prefix? I'd like to be able to get a list of WINEDLLOVERRIDES and any other configurations that I could re-use when trying to replicate this prefix on another machine. Is there potentially a better way to replicate a wine prefix (without directly using cp, rsync or tar)
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Dump / save settings from an existing Wine Prefix...

Post by jkfloris »

All settings in Wine are kept in the registry. Two places that have interesting information are:
- HKEY_CURRENT_USER\Software\Wine
- HKEY_LOCAL_MACHINE\Software\Wine

For example, you can list and save the overrides with wine reg ... or use wine regedit:

Code: Select all

# List the default overrides:
wine reg query 'HKCU\Software\Wine\DllOverrides' /s
# Save the overrides:
wine reg export 'HKCU\Software\Wine\DllOverrides' backup.reg

# List program overrides:
wine reg query 'HKCU\Software\Wine\AppDefaults' /s
# Save the overrides:
wine reg export 'HKCU\Software\Wine\AppDefaults' backup2.reg
sweet
Newbie
Newbie
Posts: 2
Joined: Tue Sep 19, 2023 3:37 pm

Re: Dump / save settings from an existing Wine Prefix...

Post by sweet »

Thank you for your reply. Exporting the reg key is exactly what I needed. The one issue I'm having with this is that when I transfer the prefix to another machine the User Registry entries has the incorrect user name in the paths of reg-keys though.
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Dump / save settings from an existing Wine Prefix...

Post by jkfloris »

You can run something like:

Code: Select all

# Convert the Windows reg file to Unix:
dos2unix backup.reg

# Find and replace the user name:
sed -i 's/user old/user new/g' backup.reg
Locked