I believe that the NT 4 Resource Kit command SHORTCUT.exe would create relative linked shortcuts. I wish that Microsoft would create a new supported utility or Powershell Cmdlet to facilitate the creation of relative .lnk files or make NTFS links work more like Linux symbolic links. Until then, I use .cmd/.bat and .ps1 files for this purpose.
Program.cmd
@"%~dp0Relative\Path\Program.exe" %*
- @ = Suppresses the command echo.
- %~dp0 = expands to the script's directory.
- Relative\Path = could include .. to backup a directory.
- %* = passes any parameters received by the script on to Program.exe.
Program.ps1
Unfortunately, though .cmd/.bat files will run from any context (the run dialog, a CMD prompt, in Powershell, double clicking in File Explorer, etc), they cannot call things stored on a UNC path. For exposing things in a UNC path, in Powershell (I do this for tools like Git and Mercurial), I will create a Powershell version of the above script.
&"$PSScriptRoot\Relative\Path\Program.exe" @args
- & = puts Powershell into command mode, so that the string in quotes gets ran.
- "" = contains a string, expanding any variables.
- $PSScriptRoot = expands to the script's directory.
- Relative\Path = could include .. to backup a directory.
- @args = passes any parameters received by the script on to Program.exe.