How are shortcuts synced so they work on both computers (windows)

Hey all! I am trying to understand how .lnk files are synced so they can be used on every synced computers. For now it seems to me that if located on my c:/ user folder, computer inheriting from the shortcut can use the link correctly even if they are not syncing it on a user folder. However, I think that when the files originate from a computer that is not syncing from a user folder, the link is broke for the peers

I can’t seem to understand how it works, if the link is relative or not, nor if syncthing changes the link’s path is some cases?

Can somebody help me with that? I want to setup my node network correctly but i feel i can’t make it work on my d:/ disk without broking links


This is more of a Windows problem than a Synching problem. You can sync .lnk files, but ideally they should point at a path that is exactly the same on all your devices (e.g. C:\Users\User\Desktop, etc.). Of course, this is only going to work if the username is identical everywhere. Otherwise, you may try to experiment with using system variables, e.g. %userprofile% instead of C:\Users\User, but from my experience, Windows may very well replace the variable with its actual path when opening the shortcut on another computer, which will then break the shortcut on other devices.

In other words, unless the path is the same on all devices, I wouldn’t bother. You may be better off with batch scripts, filling them with something like explorer.exe "%userprofile%\desktop" and using those instead, as in contrary to .lnk shortcuts, this method will allow you to preserve the variables.

Thanks for your help! I follow you that it seems to be windows related A bit of a weird thing is that, my lnks work even if the user name isn’t the same. On each machine, i can still use them as they were kind of converted (or relative from the start i don’t know? The link is users/userA on A and users/userB on B for the same file)

It doesn’t seem to work only when I use something else than the default user folder

Also, it does seem to work from master computer to secondary computers even if not a user folder. But shortcuts created on secondary nodes doesn’t seem to work between each other, sometimes… I can’t find the right rule

You may want to right-click the shortcut and check its properties. Maybe the path listed there is indeed relative? Otherwise, I’m really not sure. If the path differs, the shortcut normally will just fail to open complaining about a non-existent path, and I know this very well, because we countered the very same problem here just a few days ago, and the solution ended up being to make the paths identical.

On the other hand, Windows does have some kind of a mechanism that makes it try to “resolve” broken shortcuts automatically, so maybe that is happening in your case, resulting in the OS pointing the shortcut at the current user profile folder.

Thanks for your help! I’ll try syncing one shortcut today see if it updates it after opening it on a new machine with a different user but similar path In the shortcuts properties it doesn’t seem relative

Well by some magic if it’s from current user to current user, shortcuts keep working. If it’s from another folder that is not current user, i get desyncs

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.