X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_TF,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Message-Id: From: Denis Excoffier To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: readshortcut: print Target in raw format Date: Tue, 4 May 2010 20:17:21 +0200 Cc: Denis Excoffier Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hello, On my Cygwin system (XP) i have (probably like most of you) the following commands: 1) readshortcut.exe, from the package cygutils-1.4.2 2) SHORTCUT.EXE, from %windir%/system32 (or equivalent) They are both consistent: in case of a `Target' that contains an environment variable, the variable is resolved, for example: % readshortcut -tfw X-Cygwin.bat.lnk Target: C:\Users\me\me\cygwin2010b\Cygwin.bat % /cygdrive/c/winnt/system32/SHORTCUT.EXE -u t X-Cygwin.bat.lnk Target: C:\Users\me\me\cygwin2010b\Cygwin.bat However, in the `Properties' of the Shortcut, i can read in the Target cell: `%myhome%\cygwin2010b\Cygwin.bat' I would have preferred readshortcut.exe to show this raw path, with the environment variable %myhome% still unresolved. So i went into cygutils-1.4.2/src/readshortcut/readshortcut.c and discovered that, if the last argument of GetPath() is set to `SLGP_RAWPATH' (this is ok), the value of SLGP_RAWPATH is obtained from `#include ' (this is still ok), but it is redefined later with `#define SLGP_RAWPATH 0' (this is *not* ok, it should be 4). It seems that the intentions of the original writer were to print the raw path, but someone later changed that to be consistent with SHORTCUT.EXE (or due to some other reason). Please modify readshortcut.exe in order to be able to really print the raw path (e.g. with an extra option). Thanks in advance. Regards. Denis Excoffier. -- 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