how to express %root% on Windows? Like %appdata%. Need root of THIS usb stick for shortcuts - HotUKDeals
We use cookie files to improve site functionality and personalisation. By continuing to use HotUKDeals, you accept our cookie and privacy policy.
Get the HotUKDeals app free at Google Play

Search Error

An error occurred when searching, please try again!

Login / Sign UpSubmit
Expired

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

£0.00 @
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 o… Read More
wide Avatar
2y, 4m agoPosted 2 years, 4 months ago
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
wide Avatar
2y, 4m agoPosted 2 years, 4 months ago
Options

All Responses

(6) Jump to unreadPost an answer
Responses/page:
#1
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.
#2
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 http://stackoverflow.com/questions/19299591/how-to-create-a-custom-percent-shortcut-like-appdata
#3
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.
#4
EndlessWaves
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 on Dec 03, 2014 19:27: dgrhdtrgdr
#5
wide
does ../ work too? Don't worry, I'll try that out too.

Yup, and ../../ should work too.
#6
EndlessWaves
wide
does ../ work too? Don't worry, I'll try that out too.

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 an Answer

You don't need an account to leave a response. Just enter your email address. We'll keep it private.

...OR log in with your social account

...OR comment using your social account

Thanks for your comment! Keep it up!
We just need to have a quick look and it will be live soon.
The community is happy to hear your opinion! Keep contributing!