Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Windows 7 is there a way to add a location to the Explorer Favorites navigation pane from the command line? I'm working with systems that are frequently re-imaged, and I would like to automate adding a number of favorite folders to explorer.

I imagine these favorites are also stored in the registry. If someone knows where, I could probably automate managing them through the reg command, although this is less than ideal. I've looked at a number of locations related to explorer suggested here, but haven't found them yet.

For information on customizing the favorites section of the navigation pane with Explorer, see

share|improve this question

3 Answers 3

up vote 3 down vote accepted

They are stored in each user's profile under %USERPROFILE%\Links.

From the Start search, or Run dialog, or in Explorer (etc.) you can also get there by typing shell:links.

share|improve this answer
Wow, didn't think it would be that easy :) Any way to order the links? –  John McCarthy Sep 12 '12 at 3:16
This answer doesn't mention anything about setting up favourites via the command line. –  aaronjbaptiste Sep 14 '13 at 18:10
@aaronjbaptiste You create a regular link/shortcut to the location you'd like, and then copy it to that folder. –  Ƭᴇcʜιᴇ007 Sep 14 '13 at 18:24
@techie007 But what's the command to create a shortcut via the command line? I'm currently using a tool called xxmklink, but AFAIK there is no native way to do this. –  aaronjbaptiste Sep 16 '13 at 7:27

AFAIK there is no native method to create a shortcut via the command line (and the Favourites here cannot be a symlink, they must be a shortcut). You can do it using xxmklink:

XXMKLINK.EXE "%userprofile%\Links\Dropbox.lnk" "C:\Dropbox"

Would create a windows Explorer Favourite to C:\Dropbox

share|improve this answer

I believe this answers the question.

I made a function from that post. It might come in handy for someone:

Function New-Shortcut {
    $WshShell = New-Object -comObject WScript.Shell
    $Shortcut = $WshShell.CreateShortcut("$env:USERPROFILE\Links\$Name.lnk")
    $Shortcut.TargetPath = $TargetPath
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.