Identifying a shortcut name

From: Dave Williams (dont_at_mail.me)
Date: 09/06/04


Date: Mon, 6 Sep 2004 12:29:37 +0100

Hi, I have an odd requirement, hoping someone can help me out...

I have a program that creates a shortcut (shell links) to another program,
and I'd like the second program to be able to identify the name and location
of the shortcut used to invoke it.

I've found that by the first program not setting a current directory, the
second program's current directory is the location of the shortcut, so
that's great, but I also need to know the name of the shortcut file (so I
know if anyone renames it). I've checked envronment variables and command
line, but nothing contains the shortcut filename.

Can anyone suggest how I might find out, or an alternative approach I could
use? I considered using an associated file type rather than a shortcut,
which is great, except that I'd prefer not to have to guarantee that the PC
looking at my file has the registered association from my new file type to
my second program.

Thanks,
Dave



Relevant Pages

  • RE: IE6 does not open correctly.
    ... Properties click on ShortCut Tab then you will find these Input Textboxes; ... Folder Options and click on File Type. ... On the Edit File Type click on Edit and be sure this Info is correct: ... DDE Message: ...
    (microsoft.public.windowsxp.general)
  • Re: Curious behaviour saving over a shortcut
    ... Windows shortcuts are a .LNK file type, ... .doc file that uses the full name of the shortcut. ... MS Office System Products MVP ...
    (microsoft.public.office.misc)
  • Re: Icons
    ... Desktop icons are normaly stored under C:\Documents and ... They appear as file type = shortcut, when viewed via windows explorer. ...
    (microsoft.public.windowsxp.general)
  • Re: XP SP2 Installation made right-click on shortcut to *.exe slow
    ... lnkfile is the file type for shortcuts. ... only when I right-click on a shortcut to a *.exe. ... only entry it has in the context menu and there was still a huge delay. ...
    (microsoft.public.windowsxp.general)

Loading