You are here

Shortcuts

6 posts / 0 new
Last post
DJRWolf
Offline
Last seen: 11 years 6 months ago
Joined: 2007-02-01 01:42
Shortcuts

I was wondering if anyone knows how (or even if) you can make shortcuts that are able to work on a thumb drive even if the letter changes from one computer to the next. For example, instead of a normal shortcut saying somthing like "E:/FireFox/Firefox.exe" I'm thinking of it just having it point to the FireFox directory and the exe within it. That way I can use just a few apps on a smaller drive. Another way of saying it is I want to make a relitive shortcut instead of a fixed shortcut.

grizadams73
Offline
Last seen: 11 years 12 months ago
Joined: 2006-09-15 14:31
not directly

Windows doesn't support relative shortcuts. If you use a launcher such as PStart or PAM, you can set up their menus to use relative paths.

arqbrulo
arqbrulo's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2006-08-10 16:38
Script

I have a modified script that I got from here somewhere, and I have it setup to run everytime I plug in my drive. Open a new text file and save the following information as a vbs file.

Set objShell = CreateObject("WScript.Shell")
arrPath = Split(Wscript.ScriptFullName, "\")
strdriveletter = arrPath(0)
set colVolatileEnvVars = objShell.Environment("Volatile")
colVolatileEnvVars("phd") = strdriveletter

The path will be %phd%\PortableApps\ instead of D:\PortableApps\, in my case I used phd as in Portable Hard Drive, but you can change it to whatever you want.

[Moderator RM: Remember, <pre> not <code>]
---------------
Marge: Homer, the plant called. They said if you don't show up tomorrow don't bother showing up on Monday.
Homer: Woo-hoo. Four-day weekend.

"In three words I can sum up everything I've learned about life: it goes on." -- Robert Frost
"In three words I can sum up everything I've learned about life: baby ain't mine." -- Adam Holguin

DJRWolf
Offline
Last seen: 11 years 6 months ago
Joined: 2007-02-01 01:42
Thanks for the tips.

Thanks for the tips.

SmithTech
SmithTech's picture
Offline
Last seen: 2 years 7 months ago
Developer
Joined: 2006-11-24 18:06
DriveVar Util

You can also use my DriveVar util
You can get it HERE
drivevar.exe -a will add %PA_DRV% as an environment variable pointing to the drive you run it from (so run it from the usb drive)
drivevar.exe -d will remove the variable.

SmithTech

"Because they stand on a wall and say, 'Nothing is going to hurt you tonight. Not on my watch.'" (A Few Good Men)
Coincidence is God's way of remaining anonymous.(Albert Einstein)

Ed_P
Offline
Last seen: 6 years 1 month ago
Joined: 2007-02-19 09:09
Confused

I have the PA_DRV ev and it points to drive G:. There's only 3 problems with that, 1. PA is on my I: drive, 2. I don't have a G: drive, and 3. I don't see drivevar.exe being executed anywhere on my USB stick. It's in the Documents\Download folder but autorun invokes PortableApps.

The USB stick is NOT a U3 device but it does have 2 partitions with the 1st one a CDFS drive set as drive H:.

How do I get PA to set PA_DRV to the correct drive letter???

Ed

Topic locked