How to make shortcut to another shortcut?

9,310

Solution 1

I completely understand the utility of linking to links, and I have been searching for an easy solution as well. The best one I've come up with is to simply use Hardlinks, which point to the shortcut.lnk file. I've tested symbolic links (junctions are just for folders, not files, so they weren't tested) and these do NOT work (they are basically broken files when created, which fail to open).

Hardlinks have a number of advantages and disadvantages. The primary disadvantage is that they are almost impossible to backup easily (you need third party software or scripting to back them up to another dive or even to another location on the same drive). The primary advantage is that they automatically update when you modify the original file, so changing 1 shortcut file (new path/icon) changes all associated hardlinks as well [names for the hardlink, however, are unique, so changing a filename doesn't change the hardlink name and vice versa]. Another feature which is both an advantage and disadvantage of hardlinks is that changing icon/path for the hardlink (changing hardlink data) ALSO changes THE ORIGINAL. This does NOT include 'deleting the link itself' (the link can be deleted as any other file; without deleting the original file itself). This is advantageous because it keeps all the associated links synchronized, but it's disadvantageous in cases where the hardlink is stored in a vulnerable location, and it's data is maliciously modified, or a user error is made in modifying a single link's data. This change will be carried through to all hardlinked partners including the original. Frankly this behavior is generally useful, except in cases where you'd want a 'stable source reference' (1-way modification)

I've tested copying individual hardlinks and folders containing hardlinks, in windows explorer, and the result just creates dissociated shortcuts to the original data (no longer associated hardlinks, and therefore, don't change with modifications to the original link). I find this lack of simple copying extremely annoying, and the primary reason I'd be reluctant to use them extensively, but, if you only have a few for a specific purpose (like synchronizing links from a stable directory, to the desktop/taskbar/startmenu) they may still be a good solution (eventhough, they aren't really portable to other systems, without writing a script to automate their directory building). They DO, however, move around without breaking (you can move them anywhere in the file system, once they are created. You just can't 'copy' them). You can also make as many hardlinks to a single source as you want, but again, you can't easily 'copy-and-paste' you have to make a new hardlink from scratch for each 'copy' you want.

To make a hardlink, just open an elevated command prompt (.cmd opened to system32, or run .cmd as admin) and type:

mklink /H [path and name of Hardlink] [location of original file]

Example:

mklink /H C:\users\you\desktop\hardlink.lnk C:\users\you\location\shortcut.lnk

It's good to designate the hardlink with the filetype it links to (like, here, .lnk, but for notepad documents hardlink.txt, or similar), because it's basically a mirroring of the original file, and windows explorer treats it as if it were the original (again, a useful behavior). I should also directly state that they are ONLY created through command prompt (or 3rd party software which gives a shellExtension or gui for the command). Also, they aren't a 'mirrored copy' of the original, they may show the original object's file sizes, but they intrinsically take up 0bytes of space on the drive; they are actually references stored to the MFT of the drive (which is also the reason they can't be made between 2 different partitions [which is another feature of them worth mentioning; but which is easily overcome with a clever combo of shortcuts, junctions, symlinks, and hardlinks used together in unison])

Frankly, I believe this is exactly what you are looking for, and it is a very useful feature. If you can script well, I'm sure it's not difficult to write a program which simply builds a hardlink directory as you desire (and treat that as a 'backup' or 'portability solution' for other systems). You might also be able to find 3rd party software to make all of these tasks easier, and overcome the intrinsic unwieldiness of working with hardlinks.

Solution 2

The simplest workaround would be to use Batch files.

If Shortcut.lnk is located in C:\Files\, making a new .bat file with the following single line of code will launch the .lnk file:

"C:\Files\Shortcut.lnk"

Solution 3

One way to make a shortcut to a shortcut in Windows is to use a .url file. In Windows 10, a .url file can be the target of a .lnk file.

Also, a .lnk file can be the target of a .url file.

I succeeded in making a .lnk file that calls a .url file that calls another .lnk file that calls a .exe file.

A URL can be the address of a website, a file on the internet, or a file (or folder) on the same computer.

Here is an example of a URL for a .lnk file on the same computer: file:///C:/My%20Path/My%20Shortcut.lnk

The file path would be this: C:/My Path/My Shortcut.lnk

Share:
9,310

Related videos on Youtube

user541686
Author by

user541686

Updated on September 18, 2022

Comments

  • user541686
    user541686 over 1 year

    When attempting to create a shortcut to another shortcut, Windows XP assigns the target of the original shortcut to the new shortcut. This happens even when I enter the target path manually, and I am left with a copy of the original shortcut. This is not what I want.

    How can make a .lnk file point to another .lnk file directly? This form of double indirection would be very useful for managing shortcuts to files that move frequently.

    • soandos
      soandos about 12 years
      In windows 7 it just works... It is not the same in XP?
    • user541686
      user541686 about 12 years
      @soandos: It creates a copy of the shortcut instead of creating a shortcut to a shortcut.
  • user541686
    user541686 about 12 years
    Yeah I already knew about this (it's the 'answer' mentioned everywhere else on the internet when you search for this), but it doesn't really answer the question...
  • iglvzx
    iglvzx about 12 years
    Is there a reason why the "shortcut" to the .lnk file must also be a .lnk file? If this is important or if you have any other requirements, edit your question to include these details. You will get a better answer that way. :)
  • user541686
    user541686 about 12 years
    Uhm, yes, because that's what I asked in the question... if .bat files were enough then Microsoft wouldn't have made .lnk files...
  • user541686
    user541686 about 12 years
    And FYI, batch files behave nothing like shortcuts the moment you right-click them (or heck, they don't even look like shortcuts even when you look at them).
  • iglvzx
    iglvzx about 12 years
    Ok. I went ahead and edited your question to make this requirement more clear.
  • Simon
    Simon almost 8 years
    It was totally that option. (still work in Windows Server 2012). Please mark as answered as it exactly answered the question. I use that for "versionning" a software shared through network and launched by 15 users. When I have a new version, i just change the "first" link to point to that new release, and the hardLink is respecting the change. The hardlink is the final link that is residing on my users desktops (10-15 user profiles).
  • Andrew Steitz
    Andrew Steitz almost 6 years
    Either it doesn't work in Windows 10 or I don't understand what a hardlink is. I followed the directions exactly and it said "Hardlink created for ..." but when I right click the hardlink and view Properties it still points to the original file, not the other link. I even ran fc from the command line and it says "no differences encountered"
  • Community
    Community over 2 years
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.