Forum Home
Press F1
 
Thread ID: 125658 2012-07-11 01:28:00 Some nerdy syntax required tuiruru (12277) Press F1
Post ID Timestamp Content User
1287708 2012-07-11 01:28:00 Hi

I've go both data and portable apps stored in folders on my USB drive. I want to put a shortcut at the root level of the drive to take me to the portable app launcher that I've got in a folder. The trouble is the drive letter changes depending on the computer I stick it in - on my laptop at home it's "G", on a computer in an office I do voluntary work in it's "E". Is there some sort of path variable I can type into the shortcut dialogue box that will automatically pick up the new drive letter?

Thanks
tuiruru (12277)
1287709 2012-07-11 01:32:00 ".\subfolder\program.exe" fred_fish (15241)
1287710 2012-07-11 01:35:00 That, and you can always manually assign to a letter on both machines that is very rarely used: B! Chilling_Silence (9)
1287711 2012-07-12 01:17:00 fred, I tried that with a win7 shortcut and the program got run but the shortcut subsequently had the drive letter subbed back again. So from here it looks like a one-off solution, only. Also, it wouldn't accept the . part in the 'Startin' box.

I use the Chill solution which seems to work OK. For example, my ext drive is U:.
linw (53)
1287712 2012-07-12 03:14:00 %CD% is the command line variable for the current working directory, that may be of use. You can always substring it to get the drive letter. inphinity (7274)
1287713 2012-07-12 06:54:00 That, and you can always manually assign to a letter on both machines that is very rarely used: B!

Hi Chill - I'm going abroad so will be using it on all sorts of different machines. Is it possible to tell the USB drive that it will always be, say, "U"? How?
tuiruru (12277)
1287714 2012-07-12 06:56:00 %CD% is the command line variable for the current working directory, that may be of use. You can always substring it to get the drive letter.

Hi Inphinity

"You can always substring it to get the drive letter" - sorry - I don't know what that means :(
tuiruru (12277)
1287715 2012-07-12 07:01:00 %CD% is the command line variable for the current working directory, that may be of use. You can always substring it to get the drive letter.

Hi Inphinity

"You can always substring it to get the drive letter" - sorry - I don't know what that means :(
tuiruru (12277)
1287716 2012-07-12 07:29:00 Here's a bit more about the scenario.

I'm going abroad and taking the USB drive with me, so it will be going onto all sorts of machines. I've got some portable apps on the drive each in it's own folder - all work OK. I installed a portable app Launcher called Codysafe, which again works OK and is in it's own folder. I wanted a shortcut that would launch the launcher from the root directory. I've since discovered that Cody puts a little .exe file in the root directory which will do this, but now I'm just curious how it could be done if that.exe wasn't there.
tuiruru (12277)
1287717 2012-07-12 09:41:00 Oh, that makes it easier. A batch file in the root that executes
..\<CodySafeFolder>\<CodeSafeApp.ext>
inphinity (7274)
1 2