I'll explain my goal first to avoid "XY Problem" misunderstandings. I want to be able to produce a file (on Linux) that, when downloaded to a Windows machine and double clicked, will open a (ms office, but it shouldn't matter IIUC) file with a known path (on the local windows machine) preset by the server.
It seems what I'm trying to do is possible if I include the path of the file I want to open (and neither of the other details regarding the volume it's stored in etc) in the lnk file. I first checked the lnk file format specs trying to generate the file in a python script but that's not my piece of cake (I never wrote code to handle binary files before). Besides, there are many features of that format that I want to ditch, but I still have to grok their flags/fields/lenghts/termination etc.
Then I stumbled upon the winedump utility and some .lnk files created by WINE in my ~/.wine folder. There must be some function in the WINE codebase that is able to generate a lnk file, but I couldn't find it. Where is it? Is it in the form of a command like win's mklink? If not (and I guess it's a function somewhere if it's not) can you point it to me so that I can write a wrapper command?
Or is there any library that can write lnk files and run on GNU/Linux?
These are untested by me but I did find 2 tools on this site which does describe the 2 tools as follows:
The first app is a C app, the second is a Bash shell script. Here's the Shell script,
mslink.sh
: