#StackBounty: #linux #windows #command-line #shortcuts #file-shortcut Cross-platform shortcut to executable file, both archived

Bounty: 50

I have a directory (which is later archived) in which a shortcut to an executable file (.exe), which itself is a few directories deeper.
The first problem encountered is “.lnk” shortcuts require exact path. E.g. “D:/someFolder/parentOfShortcut/files/dir/dir/dir/software.exe commandForTheExe
and if the directory parentOfShortcut is moved to the root (for example), the shortcut will be still looking for the app in “D:/someFolder/parentOf…“.
I thought of using a “.bat” file, however, that’s a Windows-only solution, while the app itself is compatible also with both Linux and MacOS. The second problem of the “.bat” is that users never trust that type of files so does any antivirus software.

It is a quandary that the location of parentOfShortcut can be anywhere since users download that folder (as a .zip archive) and are free to save it in any given directory on their machine.

For reference, here’s the exact file structure

(unknown path)/MySoftware(.zip)
    +- Shortcut.lnk
    |- files
        |- node_modules
            |- dist
                +- theApp.exe (with command "boot.main")

Edit:

The .exe can’t be moved, for it depends on .dll files in the same, in the upper and in some lower-level directories.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.