X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=1.1 required=5.0 	tests=AWL,BAYES_00,SPF_NEUTRAL
X-Spam-Check-By: sourceware.org
X-Authority-Analysis: v=1.0 c=1 a=7BT7HJiTkxeAZTlFhmEA:9 a=x4S3KTpNTO4HqgNK2itDACcxDgwA:4
Message-ID: <4B5FB782.4080804@ftml.net>
Date: Tue, 26 Jan 2010 22:48:18 -0500
From: Ken Hirsch <kenhirsch@ftml.net>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Suggestion: relative path for cygstart
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Older versions of cygstart did not replace the file names with absolute 
windows paths. This was better since the ShellExecute function will 
search the path for a command. And, if it doesn't find it in the path, 
it will look in the registry. So you can 'cygstart calc', 'cygstart 
winword', 'cygstart services.msc', etc.

This can be accomplished by changing
  CCP_POSIX_TO_WIN_W
to
  CCP_POSIX_TO_WIN_W|CCP_RELATIVE
the two places it appears.

Interestingly, ShellExecute also accepts certain non-filename strings 
for "shell namespace objects".

For example:

Drives (My computer)
::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

Control Panel
::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}

You can try these out with the Run command on the Windows start menu or 
the CMD.EXE  START command.

This last one doesn't work in cygstart even after the CCP_RELATIVE 
change is made. This is not because of any bug in cygstart, though, so 
I'll save it for another email.

Ken Hirsch


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

