Creating relative shortcut on flash drive

01-25-2007, 10:50 PM
|
|
Registered User
|
|
Join Date: Jun 2005
Posts: 217
|
|
|
Creating relative shortcut on flash drive
Hey, I've installed a couple apps on my thumbdrive, and would like to be able to access them from the root of the thumbdrive quickly, rather than going into the folder of the application to go to the .exe. I can create a shortcut and put it on the root of the drive, and it works until I plug it into another pc, and the drive letter is different.
Is there anyway to make a relative shortcut, so that it will always work no matter what the drive letter is?
__________________
Dell Poweredge SC420
Windows MCE 2005
Intel P4 2.8 Ghz 800 Mhz FSB
1GB DDR2 RAM
40GB SATA for OS
300GB & 100GB for storage
Yamaha Dcrappy Soundcard
Pioneer DVD+/-RW Burner 16x
nVidia DualTV MCE tuner
ATI RADEON X700 PCI-E 256MB
|

01-26-2007, 07:59 AM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: United Kingdom
Posts: 1,297
|
|
|
Can't be done as far as I can see. You'll have to live with clicking on the exe file inside the folder.
|

01-26-2007, 08:00 AM
|
|
Registered User
|
|
Join Date: Jun 2005
Posts: 217
|
|
Quote:
|
Originally Posted by pip22
Can't be done as far as I can see. You'll have to live with clicking on the exe file inside the folder.
|
Dang! And I was so excited about getting rid of one extra "double-click" in my life. Oh well, thanks anyway.
__________________
Dell Poweredge SC420
Windows MCE 2005
Intel P4 2.8 Ghz 800 Mhz FSB
1GB DDR2 RAM
40GB SATA for OS
300GB & 100GB for storage
Yamaha Dcrappy Soundcard
Pioneer DVD+/-RW Burner 16x
nVidia DualTV MCE tuner
ATI RADEON X700 PCI-E 256MB
|

01-26-2007, 08:04 AM
|
 |
Registered User
|
|
Join Date: May 2006
Location: Falmouth, Cornwall, UK
Posts: 272
|
|
|
First you need to go to manage by right clicking on my computer. then to disk manager under storage tab. Make sure your flash drive is pluged in. under the volume column you should see it appear. right click it and go to change drive letter and paths... remove whatever letter has been assigned to it. click add, select "mount in the following empty NTFS Folder" click browse and select a location, (for example c:\Flash Drive\, you may have to create a new folder, depending on were you want to mount it.) click ok. Now go to where you have just mounted it, and then make a shortcut to whatever program you need.
__________________
SKULLZ
P.I.C.N.I.C = Problem In Chair Not In Computer
|

01-26-2007, 08:07 AM
|
|
Registered User
|
|
Join Date: Jun 2005
Posts: 217
|
|
Quote:
|
Originally Posted by SKULLZ1987
First you need to go to manage by right clicking on my computer. then to disk manager under storage tab. Make sure your flash drive is pluged in. under the volume column you should see it appear. right click it and go to change drive letter and paths... remove whatever letter has been assigned to it. click add, select "mount in the following empty NTFS Folder" click browse and select a location, (for example c:\Flash Drive\, you may have to create a new folder, depending on were you want to mount it.) click ok. Now go to where you have just mounted it, and then make a shortcut to whatever program you need.
|
Hm, can't go to the disk manager on my work pc, I'll have to take a look at that when I get home. Thanks.
__________________
Dell Poweredge SC420
Windows MCE 2005
Intel P4 2.8 Ghz 800 Mhz FSB
1GB DDR2 RAM
40GB SATA for OS
300GB & 100GB for storage
Yamaha Dcrappy Soundcard
Pioneer DVD+/-RW Burner 16x
nVidia DualTV MCE tuner
ATI RADEON X700 PCI-E 256MB
|

01-26-2007, 10:37 PM
|
|
Registered User
|
|
Join Date: Jun 2005
Posts: 217
|
|
Quote:
|
Originally Posted by SKULLZ1987
First you need to go to manage by right clicking on my computer. then to disk manager under storage tab. Make sure your flash drive is pluged in. under the volume column you should see it appear. right click it and go to change drive letter and paths... remove whatever letter has been assigned to it. click add, select "mount in the following empty NTFS Folder" click browse and select a location, (for example c:\Flash Drive\, you may have to create a new folder, depending on were you want to mount it.) click ok. Now go to where you have just mounted it, and then make a shortcut to whatever program you need.
|
Well, I tried this, and I can see what you're trying to do, but it still doesn't work. It still creates a static link to whatever folder I mounted it to. And it only works for the computer I've changed it on. But thanks for trying!
__________________
Dell Poweredge SC420
Windows MCE 2005
Intel P4 2.8 Ghz 800 Mhz FSB
1GB DDR2 RAM
40GB SATA for OS
300GB & 100GB for storage
Yamaha Dcrappy Soundcard
Pioneer DVD+/-RW Burner 16x
nVidia DualTV MCE tuner
ATI RADEON X700 PCI-E 256MB
|

02-13-2008, 09:02 AM
|
|
Registered User
|
|
Join Date: Feb 2008
Posts: 1
|
|
|
There are some interesting facts how Windows itself manages shortcuts. I've simply explained my experience with shortcuts which differs from common experience presented on many forums, so don't ask me what happens "inside" the Windows and how all it works.
Suppose that you have file start.exe in folder '\Program' (subfolder from the root) on drive d: and you want to make shortcut so that works on any odher drive. Right click on the file start.exe and choose "create shortcut". Move that shortcut in the root, moreover you may rename it if you want (start.lnk for example). Notice the size of the file start.lnk. Now, double-click on start.lnk to run start.exe. Program will, naturally, start because the shortcut refers to absolute location (path) of the start.exe.
Now, rename folder "Program' in any another name, for example 'New'. Click on start.lnk. Amazingly, start.exe starts again. What happened? Look at start.lnk (right click, properties) - now, it points to new location od start.exe in folder 'New'. It means that Windows "intelligently" managed shortcut and found it in new location 'New' and changed path in the shortcut start.lnk. The size of the file start.lnk changed (naturally, because the location have changed also). But now, rename folder 'New' again in 'Program'. Click agan start.lnk, start.exe will run again, and the path in start.lnk is again changed in the original one. Look at the size of the file start.lnk. It's not the same as it initially was. And not only it's not the same size, now it allocates file start.exe "dynamically". If you move both the start.lnk and 'Program' folder in any other location on any other drive (don't forget to erase it from the original location to be sure that all this work), you will always run program by clicking start.lnk.
If you move the shortcut and program folder on another location before you start it via shortcut in original location, Windows will not be able to find it. Only if you start it via shortcut on initial location, and start it again after renaming folder, Windows will be able to find it and, in certain way, "dinamically" allocate program inside the shortcut and find it later regardless of the new location ond new drive.
What really happens I don't know, and I don't have enough time to find it out, but it will work not only in Windows XP, but in Windows 98 too (I didn't try it in older versions).
|

02-13-2008, 10:06 AM
|
|
Registered User
|
|
Join Date: Jun 2005
Posts: 217
|
|
|
Cool thanks. But after a year, I think I found some other solution, or lost interest, or something!
__________________
Dell Poweredge SC420
Windows MCE 2005
Intel P4 2.8 Ghz 800 Mhz FSB
1GB DDR2 RAM
40GB SATA for OS
300GB & 100GB for storage
Yamaha Dcrappy Soundcard
Pioneer DVD+/-RW Burner 16x
nVidia DualTV MCE tuner
ATI RADEON X700 PCI-E 256MB
|

03-29-2008, 11:01 AM
|
|
Registered User
|
|
Join Date: Mar 2008
Posts: 4
|
|
Maybe after a year, you lost interest, but maybe other people want a solution for this problem too... And there IS a (very simple) solution
The post of --dp-- made me think and try.
In fact, Windows isn't that "smart", it's all about setting the properties of the ".lnk-file", so 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 
|

03-29-2008, 04:07 PM
|
 |
Temporary Ban
|
|
Join Date: Sep 2002
Location: In a plasma conduit
Posts: 1,625
|
|
Quote:
|
'\Program' (subfolder from the root)
|
Yes, that would make the shorcut take the drive it is on as the root.
Or
I think you should address the device by it's name. That stays constant.
__________________
Where there's a will, There's a way.
Pay developers, not Rapidshare!
I know nowt, but at least I'm trying. 
Quality, not quantity.
Prevention is better than cure.
Last edited by Disk_Contented : 03-29-2008 at 04:10 PM.
|

10-23-2008, 11:42 PM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 1
|
|
Solution
Relative Paths
===========
A relative path is an incomplete path that allows the OS to assume certain things. An example is "\desktop\firefox.exe"
But when using a shortcut (aka LNK) this will not work due to poor programing in the OS. The reason is that when you click a shortcut the OS starts from the main drive (usually C:) and requires an absolute path. however this is not completely true as there are specific caracters that are meant to be unknown variables. These are called wildcards.
? = one unknown character
* = one or more unknown character
So to write a path for your Firefox portable app if you use "\firefox\firefox.exe" or "L:\firefox\firefox.exe" it will not work but if you write it like "*:\firfox\firefox.exe" it should work.
Why I say "Should"
==============
As I said/typed before wild cards represent an unknown character and this means that if you have firefox installed on any drive with a same file structure it may open that or just get confused. Example: If you have Firefox installed on your C drive like so "c:\firefox\firefox.exe" and you portable firefox on your flash drive say like so "L:\firefox\firefox.exe" then the OS can not tell what you wanted to do as the relative path of both files would be the same "*:\firefox\firefox.exe".
In Short
======
1. place your portable app in a uniqely named folder (something that that app would not normally be placed in)
2. Make a shortcut that points to the file you want
3. edit the shortcut (start in not target) and place a wildcard (*) as the drive descriptor in the path. (make sure the rest of the path is correct)
4. try it out.
:) got root?
Last edited by crave420fubar : 10-23-2008 at 11:48 PM.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
All times are GMT -5. The time now is 04:32 AM. |
|
|
|