delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/02/21:58:22

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3F038DA7.7E11A4C7@dessent.net>
Date: Wed, 02 Jul 2003 18:57:59 -0700
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
X-Accept-Language: en,en-US
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: CygPath to Clipboard (was: example needed pls ...)
References: <Xns93ACAEA0E9DBEsoren1Gmane AT 80 DOT 91 DOT 224 DOT 249>

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019