Het forum

Winecfg with textfile?

Auteur Antwoorden
mice Woensdag 18 September 2013 om 16:53
miceAnonymous

In which text file store Wine the settings. I wish to edit the Windows Version of Applications there.
petch Woensdag 18 September 2013 om 21:05
petch

It's in the registry and you'd better not edit it directly.
Now what do you mean by "Windows Version of Applications"?
booman Donderdag 19 September 2013 om 0:25
booman

Sounds like he means Wine Configuration. The applications tab allows you to change values to the installed libraries and the General tab allows you to change the Windows version.

Not sure why you would want to do it anywhere else...

† Booman †
Mint 21 64-bit | Nvidia 515| GeForce GTX 1650
Linux for Beginners | PlayOnLinux Guides | PlayOnLinux Explained
petch Donderdag 19 September 2013 om 1:11
petch

To edit the registry, always use regedit.exe. It can be used interactively, but also from command line, so update can be scripted.
Structure of Wine registry keys are documented in http://wiki.winehq.org/UsefulRegistryKeys.
You want to create a value "Version" of type string into [HKEY_CURRENT_USER\\Software\\Wine\\AppDefault\\myapp.exe], this can be scripted as
cat << EOFINI > "$POL_USER_ROOT/tmp/windowsversion4app.reg"
[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\myapp.exe]
"Version"="win95"
EOFINI
POL_Wine regedit.exe "$POL_USER_ROOT/tmp/windowsversion4app.reg"
rm "$POL_USER_ROOT/tmp/windowsversion4app.reg"

(or whatever other valid version string)
With a recent version of PlayOnLinux that can also be done with

POL_Wine_UpdateRegistryWinePair 'AppDefaults\\myapp.exe' 'Version' "win95"

But that's undocumented, so I'm not sure it can be considered part of the stable API.

Aangepast door petch

booman Donderdag 19 September 2013 om 1:14
booman

Awesome! Nice tips Petch... Thanks!

† Booman †
Mint 21 64-bit | Nvidia 515| GeForce GTX 1650
Linux for Beginners | PlayOnLinux Guides | PlayOnLinux Explained
mice Vrijdag 27 September 2013 om 14:51
miceAnonymous

Thanks realy lot for this.

I checked the "http://wiki.winehq.org/UsefulRegistryKeys" Website.
But could not found how to create driveletters. Is ther also way like the windowsversion one for that?
booman Vrijdag 27 September 2013 om 16:36
booman

As in network drives or CD-ROM/DVD drives?

You can easily create drives to anywhere with Wine Configuration.
Just click the Drives tab
Click add
Select drive letter
Then browse to the path you want to use

Works with any folder or any CD-ROM... not sure if it works with networks?

† Booman †
Mint 21 64-bit | Nvidia 515| GeForce GTX 1650
Linux for Beginners | PlayOnLinux Guides | PlayOnLinux Explained
mice Vrijdag 27 September 2013 om 16:47
miceAnonymous

I know the way over Wine Configurations. I hope I could get a faster way to add driveletters in Wine. At moment I have a batch file who set som settings like the exe files for specific Windows versions. Could maybe nice if i get the ability to set the driveletters also this way.
booman Vrijdag 27 September 2013 om 16:58
booman

I'm sure there is a way, but it will take some "picking" the minds of the devs

† Booman †
Mint 21 64-bit | Nvidia 515| GeForce GTX 1650
Linux for Beginners | PlayOnLinux Guides | PlayOnLinux Explained
petch Vrijdag 27 September 2013 om 19:34
petch

Create symlinks into $WINEPREFIX/dosdevices/ subdirectory
http://www.winehq.org/docs/wineusr-guide/config-wine-main#AEN737