Is it possible to enable a register setting via command line

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
yossarianuk
Level 1
Level 1
Posts: 6
Joined: Sat Sep 19, 2009 6:27 am

Is it possible to enable a register setting via command line

Post by yossarianuk »

Hi.

God damn Wine has come a long way! Most games I have played seem faster than real windows now...

I am wondering if there is a way to add a reg key/string on the command line - so that the reg key/string doesn't exist all the time just whilst playing a game / wine session?

The reason I ask is because some games work even faster with

DirectDrawRenderer = opengl in

HKEY_CURRENT_USER\Software\Wine\Direct 3d

But some don't .

Right now I manually add/remove the reg string when I play a certain game/app.


Is there a way to launch wine and enable the reg setting cia command line ?

p.s : Isn't the windows registery a complete joke (as an idea), you could easily but wrong values that could mess up Windows - there is no verification at all....
Martin Gregorie

Is it possible to enable a register setting via command line

Post by Martin Gregorie »

On Thu, 2010-07-15 at 09:15 -0500, yossarianuk wrote:
I am wondering if there is a way to add a reg key/string on the
command line - so that the reg key/string doesn't exist all the time
just whilst playing a game / wine session?

The reason I ask is because some games work even faster with

DirectDrawRenderer = opengl in

HKEY_CURRENT_USER\Software\Wine\Direct 3d

But some don't .

Right now I manually add/remove the reg string when I play a certain
game/app.
You could also use a separate prefix for each game - the disk space
overheads aren't all that big. This way you can permanently add the
registry entry permanently for the programs that use it and not for
those it harms. As an added bonus you'll no longer run the risk of
screwing one game up while patching/upgrading another.

IMO with separate prefixes its easiest to use a wrapper script to run
each app/game. The script sets the correct prefix, changes to the
appropriate directory, runs the app and exist. You make the script
executable and have the app's menu entry run the script rather than
running the app directly - the latter assumes that all apps are in the
default .wine prefix..


Martin
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Is it possible to enable a register setting via command

Post by vitamin »

yossarianuk wrote:I am wondering if there is a way to add a reg key/string on the command line - so that the reg key/string doesn't exist all the time just whilst playing a game / wine session?

Code: Select all

[HKEY_CURRENT_USER\Software\Wine\Direct 3d]
DirectDrawRenderer = opengl
There is, but you should add that for the app specific key instead of global. Eg:

Code: Select all

[HKEY_CURRENT_USER\Software\Wine\AppDefaults\game.exe\Direct 3d]
DirectDrawRenderer = opengl
Where 'game.exe' is the executable name of your game you want this setting apply to.
yossarianuk
Level 1
Level 1
Posts: 6
Joined: Sat Sep 19, 2009 6:27 am

Post by yossarianuk »

Hi

Thanks for the responses

I have tried vitamin's way but it doesn't seem to work.

i.e - To test I have added

HKEY_CURRENT_USER\Software\Wine\AppDefaults\MaxPayne2.exe\Direct3D

And added string value

Multisampling enabled

- this should allow me to enable antialiasing - but doesn't

It does if I add the string value to the standard

HKEY_CURRENT_USER\Software\Wine\Direct3D

I am doing something wrong ?

Also - for Martin Gregorie's idea - do I need to compile wine with new prefix or just launch wine with --prefix=/home/wine2 (for example)
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

yossarianuk wrote:HKEY_CURRENT_USER\Software\Wine\AppDefaults\MaxPayne2.exe\Direct3D
Wrong, you missing space between "Direct" and "3D".
Martin Gregorie

Is it possible to enable a register setting via command line

Post by Martin Gregorie »

On Sun, 2010-07-18 at 10:11 -0500, yossarianuk wrote:
Also - for Martin Gregorie's idea - do I need to compile wine with new
prefix or just launch wine with --prefix=/home/wine2 (for example)
Not quite. It should be like this:

WINEPREFIX=wine2; wine myapp

However, if you're going to run the wine app from a wrapper script,
which is often more convenient for something that will be run a lot,
this is probably better (everything between the start/end lines is the
script:

================start of my script======================
#!/bin/bash

export WINEPREFIX=wine2
cd $WINEPREFIX/path/to/the/exe
wine myapp $*

================end of my script======================

Of course the script must be made executable:

chmod u+x myscript

The $* idiom passes all the script's command line arguments to the app,
so you can run it as:

myapp arg1 arg2 "arg3 is a String with spaces"

Martin
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Post by DaVince »

vitamin wrote:
yossarianuk wrote:HKEY_CURRENT_USER\Software\Wine\AppDefaults\MaxPayne2.exe\Direct3D
Wrong, you missing space between "Direct" and "3D".
Why do Wine registry keys need a space between Direct and 3D? The original Direct3D from MS doesn't have this space, so is it a typo in the Wine code to check the registry for a "Direct 3D"?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

DaVince wrote:Why do Wine registry keys need a space between Direct and 3D?
That's Wine specific key. It doesn't matter what native has.
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Post by DaVince »

I know. I also know my question is rather trivial, just wondering why Wine has the space there.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

DaVince wrote:I know. I also know my question is rather trivial, just wondering why Wine has the space there.
Look for the person who added it first and ask him :) Some things just happen, then everyone assumes that's the way to go.
Locked