Home

IconLocation

IconLocation is a field used in Windows shortcut (.lnk) files that specifies the icon resource displayed for the shortcut. It is part of the Windows Shell Link data format and is exposed through the Windows Shell APIs, such as IShellLinkW and the PKEY_ShellLink_IconLocation property.

The value of IconLocation is typically a string that contains a path to an icon resource, optionally

If the IconLocation path is invalid or omitted, Windows may fall back to displaying the default icon

In practice, IconLocation is used to customize the appearance of shortcuts without altering the target file.

See also: Windows shortcut (LNK) file format, IShellLink interface, PKEY_ShellLink_IconLocation.

followed
by
a
comma
and
an
index
to
select
a
specific
icon
within
that
resource.
Common
forms
include
paths
to
executable
files,
DLLs,
or
ICO
files,
for
example:
IconLocation=C:\Program
Files\MyApp\MyApp.exe,0
or
IconLocation=C:\Icons\MyIcon.ico,0.
It
can
also
use
resource
libraries
like
shell32.dll,5
to
reference
a
particular
icon
within
a
system
file.
associated
with
the
shortcut’s
target
or
a
generic
icon.
The
IconLocation
value
can
be
viewed
and
modified
by
shortcut
editing
tools
and
programming
interfaces
that
manipulate
shell
links.
It
can
be
set
or
changed
to
improve
visual
identification,
and
it
is
stored
as
part
of
the
shortcut’s
metadata
within
the
LNK
file.