PortableApps.com Wins Big in the 2009 SourceForge Community Choice Awards and hits 100 million portable apps served!

Very Odd shortcut behavior !!!

Tim Clark's picture
Submitted by Tim Clark on February 23, 2007 - 5:06pm

I have a created a short cut on my flash drive in the root Dir:

PStart[Home]
"H:\Documents\NonU3Apps\PStart\PStart.exe"

realizing that this would only work on my Home machine.

I plugged the drive into my machine at work.

The drive became "K:" as was expected.

I double clicked on the shortcut, expecting an error.
It was my intent to creat a new shortcut for the work machine.

I received NO ERROR. PStart launched as normal!!!
The shortcut CHANGED TO:
"H:\Documents\NonU3Apps\PStart\PStart.exe"

I tried this on another machine.
The drive became "G:"
I double clicked on the shortcut
I received NO ERROR. PStart launched as normal!!!
The shortcut CHANGED TO:
"G:\Documents\NonU3Apps\PStart\PStart.exe"

As wonderful as this is, I thought this was not supposed to happen.
What's Up?
All 3 machines are Windows XP pro fully patched.

Any ideas?

Tim


( categories: )

Windows XP Pro tries to fix

Windows XP Pro tries to fix invalid shortcuts if it can... it's a feature that has it's pluses and it's drawbacks. I don't know if other versions of XP or Vista have this feature or not.

Yeah, XP and probably 2000

Yeah, XP and probably 2000 simply replace the original drive letter with the one that holds the shortcut if it can't access the absolute path.

(Boring.)

But, but, but...

Please understand,

I do know that Windows can try to fix broken shortcuts.
But I thought that it basically asked you.

Something like, "This shortcut is invalid/not found do you want me to try to search for the program?". You say yes and it searches for the program and fixes the shortcut if it finds it.

This JUST DID IT!! No questions, no fuss, no muss.
Click shortcut, program launches, shortcut fixed.

I recall reading at different times in the forums about the problems with shortcuts because you could not have "relative paths [or something like that] without special utilities.

I really thought this was supposed to be a problem?

The only problem I can see in my situation is that the shortcut would be edited/rewritten everytime I changed machines and this could cause wear and tear on the sectors of the flash [you know what I'm talking about].

Feedback please?

Tim

"freenode, it's Not as Free as it used to be, Free as in Freedom" Sad

Windows will only replace

Windows will only replace the drive letter; it won't look in any other directories.

The only problem I can see in my situation is that the shortcut would be edited/rewritten everytime I changed machines and this could cause wear and tear on the sectors of the flash [you know what I'm talking about].
A byte or two every time you change drive letters is nothing. FxP does a lot of writing to fix absolute filepaths when the drive letter changes.

(Boring.)

You could use batch files

Instead of using shortcuts, you could use batch files which do not require the use of drive letters. With batch files you may use relative "pathing".

IP

Actually,

Actually,
That was my final choice.

I am using PSart.bat
[start \Documents\NonU3Apps\PStart\PStart.exe]

But it doesnt' have the pretty icon Sad

Tim

"freenode, it's Not as Free as it used to be, Free as in Freedom" Sad

You can use a "batch

You can use a "batch compile" that will transform your bat into exe file, and you can add any icon that you want.
Sorry for my english.

I'm brazilian, my english isn't good. Thanks.

How please

How do you make a batch compile "that will transform your bat into exe file" please

Tim
Geek w/o portfolio

"freenode, it's Not as Free as it used to be, Free as in Freedom" Sad

batch compiler

-
There are only 10 types of people in the world: Those who understand binary, and those who don't. - Anonymous