MASKEN - WHATS YOUR EMAIL ADDRESS ?
SEND ME AN EMAIL AND I'LL SEND YOU THE EXE

okee-dokee masken, here you go...

LINK.EXE

usage: link filename.lnk [index string]

indexes:

0 target
1 arguments
2 workingdirectory
3 comment
4 iconpath

I gave this utilitiy the following features...

1) To do a string compare against an internalize link string (like target), you run it like this...

link notepad.lnk 0 "c:\winnt\system32\notepad.exe"

KiX's @ERROR macro will be set to the following values:

-1 string < link string
0 string = link string
1 string > link string

The various indexes are listed above.

The other feature I added was the ability to dump the shortcut settings to the console, if you run it like this...

C:\> link notepad.lnk

You'll get this dumped to your console (stdout)...

[notepad.lnk]
Comment=
Target=%windir%\System32\notepad.exe
Arguments=
WorkingDirectory=%windir%
Hotkey=0
ShowCmd=1
IconPath=
IconIndex=0

The way you could use this is to redirect link's output to a temporary file ...

shell "%comspec% /c link notepad.lnk >link.ini"

Then use KiX's readprofilestring function to read any value you wanted back into your script...

Shawn.


I can't figure out a way to pass environment variables (like %WINDIR%) throught the command line to link.exe - alot of links use these in their targets and the compare doesn't work as expected - does anyone know how to pass these things ? I've already tried double quotes !

link notepad.lnk 0 "%windir%"

???

Shawn.

[This message has been edited by Shawn (edited 18 May 2001).]