Subject: Re: CygPath to Clipboard (was: example needed pls ...)
From: Brian Dessent <[email-masked]>
To: [email-masked]
Date: Wed, 02 Jul 2003 18:57:59 -0700

Soren A wrote:

> OK, Brian, your copy_cygpath tool works just fine (sans the issues
> of providing fancy escaping a' la' `ls'). But I cannot get the
> Registry to accept the entries now! Each time I try I get the keys
> created OK, but the "command" is undefined (I am writing of how we
> see the Registry in "regedit"). Somehow, my guess is that REGEDIT
> is not liking the way the data entries look and is blanking them
> out when adding the values to the keys.

Yeah, all the quoting and escaping can get pretty tedious.  It would
also be nice if Regedit-files could specify EXPAND_SZ directly.  MS has
a couple of other tools that are really handy for this kind of thing,
one is called just REG:

Command-line registry manipulation utility version 1.10.
Copyright Microsoft Corporation 1997.  All rights reserved.

REG operation <Parameter List>

  operation     [ QUERY  | ADD     | UPDATE  | DELETE | COPY |
                  SAVE   | LOAD    | RESTORE | UNLOAD | FIND |
                  EXPORT | COMPARE | IMPORT  ]

For help on a specific operation type:
  REG operation /?

Examples:

  REG QUERY /?
  REG ADD /?
  REG UPDATE /?
  REG DELETE /?
  REG COPY /?
  REG SAVE /?
  REG RESTORE /?
  REG LOAD /?
  REG UNLOAD /?
  REG FIND /?
  REG EXPORT /?
  REG IMPORT /?
  REG COMPARE /?

In our case the following (this is from a rxvt/cygwin prompt, no need
for double-backslashes if using CMD):

reg add
HKCR\\Directory\\shell\\CygPath\\command\\='%SystemDrive%/cygwin/bin/copy_cygpath.exe
"%1"' REG_EXPAND_SZ

You get get the REG program from
http://www.dynawell.com/reskit/microsoft/win2000/reg.zip

(FYI there are two other resource kit programs I use all the time,
REGFIND and SCANREG, which both do a grep on the registry.)

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/