I want to edit the path in a link file which leeds to a file or folder which changes it’s path quite often. I found some things in C or other languages but never for C#.
Test.lnk -> C:\TestFolder 1.2.3\
I want to change that link using C# to
Test.lnk -> C:\TestFolder 1.2.4\
Does anyone know how to do so?
I don’t think it’s possible to edit the path in a link file. Instead you can delete the old shortcut and create a new one using the COM Windows Script Host Object Model:
As far as I know there is no native way in .NET to do that.