This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

readshortcut: print Target in raw format



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 <shlobj.h>' (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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]