Ethereal-dev: Re: [Ethereal-dev] application path of ethereal in windows registry

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Mark H. Wood" <mwood@xxxxxxxxx>
Date: Thu, 27 May 2004 10:02:57 -0500 (EST)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 27 May 2004, arshad khan wrote:

> I am trying to run ethereal from another application(programmatically).
> For that I want to have the path of installed ethereal in the windows
> registry. I have installed Ethereal 0.10.3 on windows XP as well as on
> windows 2000 server. On XP , I am able to find the path as follows:
>
> HKEY_CURENT_USER/Software/Microsoft/Windows/ShellNoRoam/MUICache

That is a key of which I had not previously heard.  I would strongly
suggest *not* depending on any of the shell caches, as their content is
not guaranteed to be complete or stable.

> with the Key "C:\Program Files\Ethereal\ethereal.exe"  and value "Ethereal"
>
> Why is it not showing the application path in windows 2000 server?

My guess would be that that key was not defined until WinXP was designed.

> And in XP too, should not the app path be under HKEY-LOCAL-MACHINE\Software

There should indeed be a key HKLM\Software\Ethereal\Ethereal, but there
seems to be no rule requiring any values in it.  Some products place their
current version in the default value, and some keep all manner of
systemwide settings under their product keys, but many have nothing at
all.

The canonical way to make a freestanding program invokable by other
programs on MS Windows is to turn it into a COM component.  Unless you
have a use for that depth of linking or are just into pain, it's probably
easier to simply register a PROGID defining an "open" verb and have the
other application fetch the default value of
HKCR\Ethereal.ethereal.1\shell\open\command and use the path found there.

While you're at it you can also register some capture filetype
associations with Ethereal.ethereal.1 so that Explorer and the START
command will "know"  how to open them.  Then your other application could
produce or locate a capture file and just pass the path and the "open"
verb to ShellExecute() letting the Shell clank around in the Registry and
fire up Ethereal for you, if that would be useful.

Alternatively the Ethereal developers could agree to e.g. place values
such as "Ethereal path" and "Tethereal path" in
HKLM\Software\Ethereal\Ethereal.  That would be an Ethereal convention,
not a Microsoft one, and should be noted in the Ethereal documentation.

- -- 
Mark H. Wood, Lead System Programmer   mwood@xxxxxxxxx
Open-source executable:  $0.00.  Source:  $0.00  Control:  priceless!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iD8DBQFAtgMls/NR4JuTKG8RArQ6AKCOHH2gSKz45Fcl1pY5Rv3aJyJwaQCePeVc
NLEpVsX8dqUgdwqZNYALVY4=
=v7/j
-----END PGP SIGNATURE-----