EXPIRED

how to express %root% on Windows? Like %appdata%. Need root of THIS usb stick for shortcuts

Have portable progs on a stick, loads of shortcuts made up for the common use ones. Trouble is on another machine, the drive letter isn't the same. On my own I'd change it but it's in someone else's office and I only have user privs.

root equiv of %appdata%

%root% doesn't work.

Starting with / doesn't work.

Googling it isn't helping either

6 Comments

if the drive letter on the other office's PC is unused (say on your PC it is F and they DON'T have an F) you could use the cmd line subst command to map it eg if the USB is E on the other PC then: subst F: E:\ would work. If this is not the case give a specific example.

These are environment variables and you can set your own, yes.

You can set them within a script or at cmd prompt with set, and you can make "global" environment variables by going to System Properties/Advanced and clicking the Environment Variables button. Variables added there will be available to all applications. If you have existing cmd windows open, though, they won't get the global variables - you will need to open new windows to make these variables available.

Taken from stackoverflow.com/que…ata

If the shortcuts are on the same drive then why not make them relative? single dot represents the current directory, double dots for the directory above.

Original Poster

EndlessWaves

If the shortcuts are on the same drive then why not make them relative? … If the shortcuts are on the same drive then why not make them relative? single dot represents the current directory, double dots for the directory above.



In Windows? I didn't know that! Exactly what I'm looking for - will try it out!

does ../ work?

I'll try that out too.


Edited by: "wide" 3rd Dec 2014

wide

does ../ work too? Don't worry, I'll try that out too.



Yup, and ../../ should work too.

Original Poster

EndlessWaves

Yup, and ../../ should work too.



Where should ., .. & ../ work?

I'm not doing anything clever here, just a standard Windows desktop shortcut - I want to be able to instruct a user how to do it over the phone.

I expect this will work in batch, just don't want to make an existing pebkac worse.

http://i.imgur.com/pkdfdge.png
Post a comment
Avatar
@
    Text
    Top Discussions
    1. Can you change the battery on the newer style Oral B 4000 toothbrush?78
    2. Sky package66
    3. Amsterdam Booking.com advice22
    4. Should I Sky sports or not1311

    See more discussions