* regtool problem
@ 2002-05-06 23:12 luke.kendall
2002-05-06 23:19 ` luke.kendall
0 siblings, 1 reply; 6+ messages in thread
From: luke.kendall @ 2002-05-06 23:12 UTC (permalink / raw)
To: cygwin
I'm trying to use regtool to find the locations that software is
installed on a system, so as to write some post-install scripts
so that scripts like "word" and "excel" work (i.e., build in
pathname to executable, or define an MSOFFICE environment variable, or
whatever), and a desktop shortcut to start X11.
But I discovered on the way that regtool doesn't appear to work if the
key name has slashes in it. E.g. while you can use cygpath -w to
determine the install directory for cygwin, you don't seem to be able
to do it with regtool. I tried what seemed the right way:
regtool -p list "\HKLM\software\Cygnus solutions\cygwin\mounts v2\/\native"
and every other combo I could think of, but always got the error:
Error: The system cannot find the file specified.
Regedit shows that the key and value is there. I can't access it via
regtool, though.
What I really want, actually, is grepreg, so I can say:
grepreg word\.exe
Ah, wait, I can answer my own question. The "regtool -p list" shows
that those keys aren't "directories", so for such leaf keys you then
have to use a "get". My trouble is the regtool terminology, I think.
You have keys and values, and I wanted to find the value of the "value"
"\HKLM\software\Cygnus solutions\cygwin\mounts v2\/\native".
I guess regtool calls these leaf keys "values", and all the other keys
"keys". I think the man page would be greatly helped if the terms key
and value in regtool's context were carefully defined.
BTW, where is the source code for regtool? I guessed it might have been
in sh-utils or cyg-utils or even pkgconfig, but it isn't. Is there a
way to find the package that a program comes from?
luke
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: regtool problem
@ 2002-05-07 0:26 Mellman Thomas
2002-05-07 0:57 ` luke.kendall
2002-05-07 7:48 ` Christopher Faylor
0 siblings, 2 replies; 6+ messages in thread
From: Mellman Thomas @ 2002-05-07 0:26 UTC (permalink / raw)
To: 'luke.kendall@cisra.canon.com.au', cygwin
>>-----Original Message-----
>>From: luke.kendall@cisra.canon.com.au
>>[mailto:luke.kendall@cisra.canon.com.au]
>>Sent: Tuesday, May 07, 2002 8:19 AM
>>To: cygwin@cygwin.com
>>Subject: Re: regtool problem
>>
>>
>>On 7 May, To: cygwin@cygwin.com wrote:
>>> What I really want, actually, is grepreg, so I can say:
>>>
>>> grepreg word\.exe
>>
>>The reason I want that is, finding the installed path of an executable
>>in something like MS Office, where there are many different versions
>>and which can be in different places in the registry, is a pain if you
>>have to walk the registry tree to try to find it.
The way I do this is export the registry using regedit and then use
reasonable (i.e. text) tools on it.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: regtool problem
2002-05-07 0:26 Mellman Thomas
@ 2002-05-07 0:57 ` luke.kendall
2002-05-07 7:48 ` Christopher Faylor
1 sibling, 0 replies; 6+ messages in thread
From: luke.kendall @ 2002-05-07 0:57 UTC (permalink / raw)
To: Mellman Thomas; +Cc: cygwin
On 7 May, Mellman Thomas wrote:
> The way I do this is export the registry using regedit and then use
> reasonable (i.e. text) tools on it.
I don't see how to do that in a script - if I run even "regedit /?", it
pops up a GUI and requires interaction. Not useful inside an automated
script!
Is there an undocumented command line option that can force it to dump
out the registry in text format?
luke
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: regtool problem
2002-05-07 0:26 Mellman Thomas
2002-05-07 0:57 ` luke.kendall
@ 2002-05-07 7:48 ` Christopher Faylor
1 sibling, 0 replies; 6+ messages in thread
From: Christopher Faylor @ 2002-05-07 7:48 UTC (permalink / raw)
To: cygwin
On Tue, May 07, 2002 at 09:26:18AM +0200, Mellman Thomas wrote:
>>>-----Original Message-----
>>>From: luke.kendall@cisra.canon.com.au
>>>[mailto:luke.kendall@cisra.canon.com.au]
>>>Sent: Tuesday, May 07, 2002 8:19 AM
>>>To: cygwin@cygwin.com
>>>Subject: Re: regtool problem
>>>
>>>
>>>On 7 May, To: cygwin@cygwin.com wrote:
>>>> What I really want, actually, is grepreg, so I can say:
>>>>
>>>> grepreg word\.exe
>>>
>>>The reason I want that is, finding the installed path of an executable
>>>in something like MS Office, where there are many different versions
>>>and which can be in different places in the registry, is a pain if you
>>>have to walk the registry tree to try to find it.
>
>The way I do this is export the registry using regedit and then use
>reasonable (i.e. text) tools on it.
Gee, why not binary edit the disk partition using WordPad or something,
if you are trying to make work for yourself?
The mount command provides information on everything in the registry.
cygcheck also dumps the mount information. Inspecting the registry
directly makes no more sense for cygwin than it does for any other
installed program on Windows.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: regtool problem
@ 2002-05-07 1:59 Schaible, Jorg
0 siblings, 0 replies; 6+ messages in thread
From: Schaible, Jorg @ 2002-05-07 1:59 UTC (permalink / raw)
To: cygwin
>But I discovered on the way that regtool doesn't appear to work if the
>key name has slashes in it. E.g. while you can use cygpath -w to
>determine the install directory for cygwin, you don't seem to be able
>to do it with regtool. I tried what seemed the right way:
>
>regtool -p list "\HKLM\software\Cygnus solutions\cygwin\mounts
>v2\/\native"
Use normal slashes or escape the backslash with another backslash ...
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-05-07 14:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-06 23:12 regtool problem luke.kendall
2002-05-06 23:19 ` luke.kendall
2002-05-07 0:26 Mellman Thomas
2002-05-07 0:57 ` luke.kendall
2002-05-07 7:48 ` Christopher Faylor
2002-05-07 1:59 Schaible, Jorg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).