Portable .lnk files

Discuss anything related to portable freeware here.
Message
Author
donald
Posts: 562
Joined: Wed Dec 19, 2007 4:14 am
Location: knoxville TN USA

Re: Portable .lnk files

#31 Post by donald » Sun Nov 08, 2009 7:15 pm

m^(2)

I am sorry to say that both download links are failing me.

I get a 404 for the first and the second gives a file not found.

This lnker does sound like a very interesting application.

User avatar
guinness
Posts: 4118
Joined: Mon Aug 27, 2007 2:00 am
Contact:

Re: Portable .lnk files

#32 Post by guinness » Sun Nov 08, 2009 11:25 pm

Same here.
Added 179 Applications: Portable

-.-
Posts: 325
Joined: Mon Oct 06, 2008 4:32 pm

Re: Portable .lnk files

#33 Post by -.- » Mon Nov 09, 2009 3:56 am

http://download.cnet.com/Bat-To-Exe-Con ... 55897.html
bat to exe converter, hope it works since i can see it, but its same link as one on page

viewtopic.php?t=3211
use this to get icon file, its better than one listed on the other page imo

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

Re: Portable .lnk files

#34 Post by m^(2) » Wed Nov 11, 2009 12:23 pm

Fixed the download link.

User avatar
Midas
Posts: 4272
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Portable link files (i.e. relative shortcuts via CLI)

#35 Post by Midas » Tue Jul 23, 2013 3:15 am

Very old thread update: after reading this topic (as well as other resources) I settled on a variation of the command below for the shortcut properties 'Target' field coupled with the 'Run: Minimized' option whenever I need to create a portable shortcut (.lnk) file:

Code: Select all

%COMSPEC% /C "START "" "%CD%\ProgName" CommandLineParameter(s)"
(please, heed the repeated double quotes...)
[EDIT: And then replace the path in the "Start in:" field with '%CD%'.

Also, If you'd like to change the icon of the resulting shortcut to something more meaningful than the default command console icon and don't want to be browsing through your whole filesystem via an unwieldy "Open file" dialog, you'll have to somehow copy the absolute path to the target executable, click on the "Change icon..." button, paste it in the "Look for icons in this file" field, and then click "Browse..." to chose the intended file and icon -- and don't worry with the absolute path being recorded, it'll automagically follow your shortcut. Yewh!

All credit goes to ashghost, who first showed me a way to do all this.]

BTW, while the /MIN switch is well known, there seems to exist an undocumented /S parameter for the START command that will run a console program without displaying the console window (further reports appreciated!). I haven't tested this extensively, so YMMV...

The lnker.exe console utility kindly provided by m^2 here has gone AWOL, but something he stated previously (viewtopic.php?p=13329#p13329) about the relative vs absolute nature of the paths included in shortcut files came back to me when I found a page (partly) about muting undesirable behavior via the system's registry:

Code: Select all

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"LinkResolveIgnoreLinkInfo"=dword:00000001
[When set to 1] Windows only searches the current target path. It does not search for the original path even when it cannot find the target file in the current target path.

Shortcut files typically include an absolute path to the original target file as well as the relative path to the current target file. When the system cannot find the file in the current target path, then, by default, it searches for the target in the original path. If the shortcut has been copied to a different computer, the original path might lead to a network computer, including external resources, such as an Internet server.
It concerns Windows 2000, but I believe it remains valid(?). Posting this here might benefit future generations... :mrgreen:

EDIT: another related utility is Relative (see viewtopic.php?t=21250).

BTW, since Windows Vista, an internal CLI command is available for managing filesystem symbolic links: mklink (for info, see http://ss64.com/nt/mklink.html).

portable%20shortcuts shortcut%20portable lnk

Marc
Posts: 153
Joined: Sun May 15, 2011 6:06 pm

Re: Portable .lnk files

#36 Post by Marc » Sun Oct 09, 2016 1:46 pm

I'm starting to wonder if for audio files it isn't better to use playlist files which can be crerated with relative paths. Foobar can't correctly interpret windows shortcuts and is unable to play the redirected tracks.
Winamp can play them but it reports the path of the audio files such as

Code: Select all

C:\DOCUME~1\Marc\ESCRIT~1\SELECC~1\013128~1.SEL\01629A~1.CAR\ADELE-~3.MP3
The problem is that I'm unaware of any way to create a single playlist file for each audio file, so that each playlist contains only one track.

billon
Posts: 566
Joined: Sat Jun 23, 2012 4:28 pm

Re: Portable .lnk files

#37 Post by billon » Sun Oct 09, 2016 3:06 pm

XMPlay can play shortcuts without any problems and displays paths correctly. It can also create playlist with only one track.
fubar sux

Marc
Posts: 153
Joined: Sun May 15, 2011 6:06 pm

Re: Portable .lnk files

#38 Post by Marc » Thu Oct 13, 2016 5:46 pm

billon wrote:It can also create playlist with only one track.
I meant in batch.

billon
Posts: 566
Joined: Sat Jun 23, 2012 4:28 pm

Re: Portable .lnk files

#39 Post by billon » Fri Oct 14, 2016 12:22 am


Marc
Posts: 153
Joined: Sun May 15, 2011 6:06 pm

Re: Portable .lnk files

#40 Post by Marc » Fri Oct 14, 2016 2:48 am

These are nice apps, but as far as I can tell they cant batch create separated playlists containing one track each, for a large number of files.

Marc
Posts: 153
Joined: Sun May 15, 2011 6:06 pm

Re: Portable .lnk files

#41 Post by Marc » Mon Oct 24, 2016 2:32 pm

The link for Inker is down. It isn't either in wayback machine. Maybe someone can upload it :roll:
Probably a foolish question does it create a portable .Ink file or modify an existing non-relative shortcut?
Relative seems to be of the first type.

User avatar
Midas
Posts: 4272
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: NiftyLink

#42 Post by Midas » Fri Jun 22, 2018 9:13 am

NiftyLink (http://luethje.eu/prog/niftylink_en.htm) is yet another solution for the relative path shortcut conundrum. It was designed as a Total Commander plugin, but runs well enough by itself and in a portable fashion.
NiftyLink is a 32 bit program for Windows 2000/XP/Vista/7, that integrates with Windows Explorer, and provides additional functionality as portable add-on for Total Commander (v7.50+). It allows creation and execution of special links to directories, files, and internet addresses. These links provide possibilities, that are not given with any standard Windows link (LNK file, junction, symbolic link, or hard link).


Image


NiftyLink v1.10a, dated 2012-11-06, can be downloaded from http://luethje.eu/prog/.

IMHO, on Windows Vista and newer, the easiest and quickest way to deal with this is by generating symbolic links containing relative paths using the above mentioned mklink CLI command. Should you decide to go this way, however, discretion should be used on the shortcomings quoted by lautrepay at the Relative topic.

Anyone still running Windows XP should probably check NTFS Link (https://elsdoerfer.name/ntfslink), which while not specifically designed to solve the current problem gives a better overview of that OS linking capabilities.

BTW, the pointer came from a somewhat related topic at viewtopic.php?t=14796.

Post Reply