Portable .LNK files

Discuss anything related to portable freeware here.
Message
Author
Island Boy
Posts: 123
Joined: Wed Sep 19, 2007 7:56 pm

#16 Post by Island Boy »

XP tell me "target field" is invalid when I type & add anything to the adress.
e.g. a&b.txt

Lnker is not at fault.

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

#17 Post by m^(2) »

Oh, you meant that it happens when you start lnker with a shortcut?
Strange.
Maybe all paths you tried contain spaces?
In such case the command should look like:

Code: Select all

"c:\lnker dir\lnker.exe" .\a&b.exe

MePerson
Posts: 7
Joined: Sun Apr 08, 2007 5:06 pm

#18 Post by MePerson »

It doesn't work on my computer (Vista SP1).

Also, why does it say "Error" in the title when it makes the shortcut?

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

#19 Post by m^(2) »

Check if it has write rights to it's working directory [by default - it's own directory].

It writes "Error" because I was to lazy to do it another way.
This project is very quick and dirty because it's not in any way interesting for me and I really hope sb. writes a better version to take it off my head.

ADDED: What do you mean by "it"? The fact that you know how the "Done" box looks gives me doubts.

Island Boy
Posts: 123
Joined: Wed Sep 19, 2007 7:56 pm

#20 Post by Island Boy »

Thanks m^(2). I was foolishly trying to delete the double quotes " which are only present when lnker.exe is in a directory (folder)

By the way....

Anyway to get these "relative path shortcuts" to display an "relative path icon" of my choosing.

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

#21 Post by m^(2) »

Island Boy wrote:Thanks m^(2). I was foolishly trying to delete the double quotes " which are only present when lnker.exe is in a directory (folder)

By the way....

Anyway to get these "relative path shortcuts" to display an "relative path icon" of my choosing.
I don't know, possibly there is a way.
Lnk file format supports custom icons, there's only question whether they can have relative paths.
But I want to encourage people to take this project off me, so I want lnker to have minimal functionality.

alanbcohen
Posts: 82
Joined: Tue Feb 13, 2007 2:40 pm

#22 Post by alanbcohen »

m^(2) wrote:But I want to encourage people to take this project off me, so I want lnker to have minimal functionality.
I've posted a link to this thread to the PortableApps forums where there are a number of people actively doing development. Maybe one of them will pick this up. If I see any activity on it over there, I'll post a link to it here.

MePerson
Posts: 7
Joined: Sun Apr 08, 2007 5:06 pm

#23 Post by MePerson »

m^(2) wrote:Check if it has write rights to it's working directory [by default - it's own directory].

It writes "Error" because I was to lazy to do it another way.
This project is very quick and dirty because it's not in any way interesting for me and I really hope sb. writes a better version to take it off my head.

ADDED: What do you mean by "it"? The fact that you know how the "Done" box looks gives me doubts.
Sorry, what I meant is that it runs and creates the link successfully, but double-clicking it doesn't do anything.

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

#24 Post by m^(2) »

Are you sure that it was not a typo and the file exists where it's supposed to be?
I would be very surprised if it really didn't work...and sadly, it would probably mean that portable links are not compatible with Vista.
Is there anybody who has Vista and can confirm that there are troubles?

Island Boy
Posts: 123
Joined: Wed Sep 19, 2007 7:56 pm

display any icon

#25 Post by Island Boy »

I think it would be cool if link.exe by defalt display any icon nane "ICON.ICO" in the app folder.

or maybe "App Name.exe.ICO" in the same location is the shortcut.
(but this icon file would need to be hidden)


Hide files how to: viewtopic.php?t=2497

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

#26 Post by m^(2) »

Executables have icons built it, so separate .ico isn't needed. Anyway, as I stated before, I'm not going to implement it.

Island Boy
Posts: 123
Joined: Wed Sep 19, 2007 7:56 pm

Just making suggestions

#27 Post by Island Boy »

Just making suggestions to the PortableApps forums guys that might be reading this. ha, ha....

Don't always like apps built in icons.

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

Re: Just making suggestions

#28 Post by m^(2) »

Island Boy wrote:Just making suggestions to the PortableApps forums guys that might be reading this. ha, ha....

Don't always like apps built in icons.
So change them.
In case of PA.com apps you have to recompile with CRC check turned off. Though. I usually do this with their programs. ;)

Island Boy
Posts: 123
Joined: Wed Sep 19, 2007 7:56 pm

Why not making it simple?

#29 Post by Island Boy »

I found an interesting post on a forum.

http://www.virtualplastic.net/msgboard/ ... thread=708

RockyTDR said,
Why not making it simple? Just let Windows do the work... I'll try to explain:

Suppose that you have file "start.exe" on your flashdrive in folder 'Program' (subfolder from the root) on drive D: and you want to make a shortcut that works on any other drive. Right click on the file start.exe and choose "create shortcut".
Move that shortcut in the root. You may rename it if you want. The program will, naturally, start because the shortcut refers to absolute location (path) of the start.exe.
Now, look at start.lnk (right click, properties). Erase everything in the second box from the top (Next to it says: "Start in:" or "Begin in:"... I'm not sure, because my pc is Dutch)
Now your shortcut works on every pc, with every drive letter!

Note: if the drive letter changes, the shortcut won't have the program's icon until you click on it... but that's not the most important thing
I ask myself...
Would RockyTDR "trick" work with 98 or "Read Only" media like a CD or a locked flash card?....

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

#30 Post by m^(2) »

This is a bad idea.
Why does it work?
Windows creates links containing 2 paths - full and relative.
By default, Windows uses the full one. When it's invalid, it changes drive letter to the letter of the drive .lnk is on and tries again. Then uses the relative one.

Did you notice that I didn't mention "Start in"? Because it doesn't mater. By removing it, you don't help in any way and some programs (fortunately it's not common) will refuse to run without it.

Also, when you create shortcut like this, the relative path is .\start.exe and doesn't work as soon as you move it to the root of the drive, a better way would be new->Shortcut performed on the root of the drive.

So if usual shortcut would work even better than such one, why isn't it considered portable? Because of 2 things. First, you may be unlucky that full path will actually point to an existing file on a local drive, usually low chance, but actually happened to me. When created as RockyTDR suggested (it's the most popular way, I guess), they don't contain valid relative paths, so it's only drive letter portability, not full path portability.

Post Reply