Shortcut Magic

Windows shortcuts aka LNK files have interesting capabilities. The shortcut target can be stored not only as a fixed-path string, but also as an item ID list. If a shortcut is equipped with such a list, it is - to a certain extent - platform-independent.

When the shortcut target is resolved, the current platform is taken into account and the resulting path is modified accordingly. Here is an example: Looking at the properties of the Internet Explorer shortcut in Start Menu on a German copy of Windows XP, you will notice that the target path points to something below “C:\Programme”:

Shortcuts - Windows XP IE link viewed from 32-bit process on German Windows XP

When you look at the properties of the same shortcut from 64-bit Explorer on Windows 7 x64 you see something entirely different:

Shortcuts - Windows XP IE link viewed from 64-bit process on Windows 7

The target path was auto-corrected from “C:\Programme” to “C:\Program Files”. And this goes event further: when viewed from a 32-bit process on Windows 7 x64 even different properties are displayed:

Shortcuts - Windows XP IE link viewed from 32-bit process on Windows 7

Now we have the 32-bit Program Files folder “C:\Program Files (x86)”.

Comments

Related Posts

Dissecting a Shortcut

Ever wondered about the layout of shortcut files? Those tiny little buggers with the extension LNK you have probably dozens of on your desktop? For years the format was subject to reverse engineering and speculation. Last year Microsoft finally released an official format specification, documenting this surprisingly complex format. This article is the result of analyzing a typical LNK file with the help of Microsoft’s documentation and information from other sources.
Windows Internals

Latest Posts

Fast & Silent 5 Watt PC: Minimizing Idle Power Usage

Fast & Silent 5 Watt PC: Minimizing Idle Power Usage
This micro-series explains how to turn the Lenovo ThinkCentre M90t Gen 6 into a smart workstation that consumes only 5 Watts when idle but reaches top Cinebench scores while staying almost imperceptibly silent. In the first post, I showed how to silence the machine by replacing and adding to Lenovo’s CPU cooler. In this second post, I’m listing the exact configuration that achieves the lofty goal of combining minimal idle power consumption with top Cinebench scores.
Hardware

Fast & Silent 5 Watt PC: Lenovo ThinkCentre M90t Modding

Fast & Silent 5 Watt PC: Lenovo ThinkCentre M90t Modding
This micro-series explains how to turn the Lenovo ThinkCentre M90t Gen 6 into a smart workstation that consumes only 5 Watts when idle but reaches top Cinebench scores while staying almost imperceptibly silent. In this first post, I’m showing how to silence the machine by replacing and adding to Lenovo’s CPU cooler. In a second post, I’m listing the exact configuration that achieves the lofty goal of combining minimal idle power consumption with top Cinebench scores.
Hardware