Is there a CLI for winecfg and winetricks?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
vfoster
Newbie
Newbie
Posts: 1
Joined: Mon Aug 02, 2021 8:05 pm

Is there a CLI for winecfg and winetricks?

Post by vfoster »

It seems like most resources online describe using winecfg and winetricks as GUI programs, first launching them from the terminal (or otherwise) and doing the actual configuration by clicking on the buttons.

Do these programs have a CLI? Seems like

Code: Select all

wine winecfg -h
and

Code: Select all

wine winecfg --help
just launches the GUI version. I've searched around and could not find anything about command line arguments for these.
spoon0042
Level 6
Level 6
Posts: 570
Joined: Thu Dec 24, 2009 11:00 am

Re: Is there a CLI for winecfg and winetricks?

Post by spoon0042 »

Recent winecfg has a CLI, though all it is capable of is displaying or setting the global Windows version. And 'winecfg /?' will print a help message about that.

(In theory since most winecfg settings are in the registry you could import a .reg file from the command line but that gets a bit silly.)

winetricks though has a CLI and it may even be the 'default' over the GUI. (Like I know next to nothing about the GUI so it's hard to make a comparison.) Try 'winetricks --help' in a terminal. Generally if you know what "verb" you want you can just run like 'winetricks -q vcrun2015' to install those dlls and do whatever setup is needed.
Bamm
Level 4
Level 4
Posts: 136
Joined: Thu May 22, 2008 3:18 am

Re: Is there a CLI for winecfg and winetricks?

Post by Bamm »

For winetricks, type the following to see all possible commands you can give to winetricks:

Code: Select all

winetricks list-all
Warning, it's a loooong list. Furthermore, the -q command tells winetricks to not show the GUI.

Example:

Code: Select all

winetricks -q dotnet35 dotnet48 win10
The above command will silently install dotnet35 and dotnet48 and then set the windows version to "Windows 10" without the GUI.

Many of the things you set in winecfg can be set by winetricks, such as dll overrides, sound drivers, win version, etc.
Locked