Problem We have lots of not working .lnk files on a Windows Server 2016.
Example:
Clicking on the shortcut 91205248__Orig.lnk
causes the error:
Problem with shortcut - the drive or network ....
What I found out
- The .lnk file can be edited in explorer
- The stored path is correct
"R:\my subfolders\Fallordner 2012\91205248"
- After cutting out and saving the same path again the .lnk works
- Size not working .lnk files: 15kb
- Size working .lnk (after resaving): 2kb
Tracing with sysinternals procmon.exe
Working .lnk file:
Not working .lnk file:
Size changes after re-saving
15 kb = not working original
History
The system is migrated from Windows 2008 R2 file server / terminal server to server 2016 file server / terminal server
Questions
- How can malformed .lnk files be recognized?
- Is there any way to fix it (except manually opening and saving each .lnk file again)?
Edit
.lnk files are no text files, so simple search / replace operations won't work.
Edit2
I hesitate to perform a bulk operation and rewrite all paths in the .lnk files (as described here: Modify shortcut file (.lnk) target path using Powershell). So I hope there is somebody who faced a similar problem and solved successfully.
.lnk files are just text files.
Open both the working and non-working lnk files in a text editor and see if there is a difference in the format.
If there is, use unix text tools to recursively change all the non-working files to match the format of the working files.