LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

wine-reg

Read and modify the Wine registry from the command line

TLDR

Add a value to a registry key
$ wine reg add [HKCU\Software\MyApp] /v [Setting] /t [REG_SZ] /d [value] /f
copy
Query a key and its values
$ wine reg query [HKCU\Software\MyApp]
copy
Delete a value from a key
$ wine reg delete [HKCU\Software\MyApp] /v [Setting] /f
copy
Copy a key (with subkeys) to another location
$ wine reg copy [HKCU\Software\MyApp] [HKCU\Software\MyAppBackup] /s /f
copy
Import registry entries from a .reg file
$ wine reg import [file.reg]
copy
Export a key to a .reg file
$ wine reg export [HKCU\Software\MyApp] [file.reg]
copy

SYNOPSIS

wine reg operation key [options]operation := add | delete | query | copy | import | export

DESCRIPTION

wine reg is Wine's reimplementation of the Windows reg.exe console tool. It lets you inspect and edit the registry of a Wine prefix without launching the graphical regedit, which is handy for scripting installers, applying tweaks in a Wineprefix, and automating application configuration.Registry keys are addressed by their root and path, for example HKEY_CURRENT_USER\Software\MyApp. The standard root abbreviations are accepted: HKLM (HKEYLOCALMACHINE), HKCU (HKEYCURRENTUSER), HKCR (HKEYCLASSESROOT), HKU (HKEYUSERS), and **HKCC** (HKEYCURRENT_CONFIG).The tool operates on the registry of the prefix named by the WINEPREFIX environment variable (defaulting to ~/.wine). Each operation is a separate subcommand documented in its own page.

OPERATIONS

add

Create a key, or add or overwrite a value within it.
delete
Remove a key, a single value, or all values under a key.
query
Display the values stored under a key, optionally recursing into subkeys.
copy
Copy a key's values (and optionally its subkeys) to another key.
import
Merge the contents of a .reg file into the registry.
export
Write a key and its contents to a .reg file.

CAVEATS

Backslashes in key paths may need quoting or escaping depending on your shell. Editing the registry of the wrong prefix is a common mistake; set WINEPREFIX explicitly when you maintain more than one. As with the native Windows tool, careless changes can break applications, so back up keys with export before modifying them.

SEE ALSO

RESOURCES

Copied to clipboard
Kai