Registry override?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
jcfuller
Level 2
Level 2
Posts: 21
Joined: Tue May 20, 2008 1:20 pm

Registry override?

Post by jcfuller »

I first installed kchmviewer.

I then created the file run_prog:
#!/bin/sh
$1 "`wine winepath -u "$2"`"

I tested by running from a terminal
run_prog kchmviewer c:\MyChmFile.chm
This worked fine

I edited the registry entry for chm.file to
/usr/bin/run_prog kchmviewer %1
Note:
While researching regedit I noticed the reference to wineprefixcreate at:
http://wiki.winehq.org/UsefulRegistryKeys

Do you now call wineboot to update?
A windows program using ShellExecute with "open" on c:\MyChmFile.chm appears to still call HH.EXE

Is it possible to override wine using HH.EXE?

Last tested on clean install of rc2


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

Re: Registry override?

Post by vitamin »

jcfuller wrote:I first installed kchmviewer.

I then created the file run_prog:
#!/bin/sh
$1 "`wine winepath -u "$2"`"

I tested by running from a terminal
run_prog kchmviewer c:\MyChmFile.chm
This worked fine

I edited the registry entry for chm.file to
/usr/bin/run_prog kchmviewer %1
Note:
While researching regedit I noticed the reference to wineprefixcreate at:
http://wiki.winehq.org/UsefulRegistryKeys

Do you now call wineboot to update?
A windows program using ShellExecute with "open" on c:\MyChmFile.chm appears to still call HH.EXE

Is it possible to override wine using HH.EXE?

Last tested on clean install of rc2


James
You need to associate that file extension properly - see [HKEY_CLASSES] registry hive. It works the same as on windows.
jcfuller
Level 2
Level 2
Posts: 21
Joined: Tue May 20, 2008 1:20 pm

Post by jcfuller »

vitamin,
I assume you mean HKEY_CLASSES_ROOT?

I thought I did.

I have:
.chm Default REG_SZ chm.file


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

Post by vitamin »

jcfuller wrote:vitamin,
I assume you mean HKEY_CLASSES_ROOT?
Yeah sorry.
jcfuller wrote:I thought I did.

I have:
.chm Default REG_SZ chm.file

James
And what do you have under chm.file?
jcfuller
Level 2
Level 2
Posts: 21
Joined: Tue May 20, 2008 1:20 pm

Post by jcfuller »

vitamin wrote:
jcfuller wrote:vitamin,
I assume you mean HKEY_CLASSES_ROOT?
Yeah sorry.
jcfuller wrote:I thought I did.

I have:
.chm Default REG_SZ chm.file

James
And what do you have under chm.file?

In my original post.

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

Post by vitamin »

jcfuller wrote:
vitamin wrote:
jcfuller wrote:vitamin,
I assume you mean HKEY_CLASSES_ROOT?
Yeah sorry.
jcfuller wrote:I thought I did.

I have:
.chm Default REG_SZ chm.file

James
And what do you have under chm.file?

In my original post.

James

Code: Select all

wine regedit /e - "HKEY_CLASSES_ROOT\chm.file"
jcfuller
Level 2
Level 2
Posts: 21
Joined: Tue May 20, 2008 1:20 pm

Post by jcfuller »

you're the man vitamin. Thank You

works fine except if there is a space in the path I use in the
ShellExecute call.

Doesn't make a difference if I enclose the path in double quotes.

I tried a couple different variations of single and double quotes but no joy.

James
jcfuller
Level 2
Level 2
Posts: 21
Joined: Tue May 20, 2008 1:20 pm

Post by jcfuller »

Got it.
I added quotes to the chm.file entry

/usr/bin/run_prog kchmviewer "%1"

Thanks again vitamin

James
Locked