Featured Resource:

line

Newsletter

Email Address:


line

Ask the Expert

Have a question for our resident expert? Email your questions to Bob or post in the Forum.

« SCWCMD.EXE | Main | Favorite Links »

Vista's Symbolic Link Feature

Similar to junctions, symbolic links take the feature a couple of steps further. While junctions are limited to the NTFS 5.0 system, symbolic links do not share this restriction. Even better, you can link to individual files as opposed to only folders as is the requirement of junctions.

The feature is designed to aid in migration and application compatibility (particularly with UNIX operating systems). They are transparent to users and appear as normal files or directories. As such, you can fake programs and the operating system into using alternate names and references to files and folders with this feature.

By default only members of the administrators group can create links, but you can adjust this via local security policy if you wish:

Secpol.msc > Security Settings > Local Policies > User Rights Assignment > Create symbolic links

Note: if you make a change here, you’ll need to log out and back in again for the change to take effect. However, you may just want to run your command prompt as administrator to get the job done as to write a file to a system location you will need such permission anyway.
To create a symbolic link, use the mklink command. For example the below command line will create a symbolic link to the windows directory named “win” (note that by default links are created to files so you must specify the /d argument for a directory link)…

mklink /d win c:\windows

Keep in mind that the link will be created in the current folder so if you want it available to you all the time, you may wish to create it in a system file that is part of your default path such as the “Windows” or “System32” directories. You can do this by changing to one of these directories beforehand

Unlike junctions, when you click these in File Explorer, they take you to the linked directory (as opposed to junction which typically returns a confusing “Access Denied” message.

Note: You can even do the same for network locations: mklink /d svrroot \\server\c$

Library Resources

line
line

Bob Kelly's Bio:

Bob Kelly is the founder of AppDeploy.com — a resource focused on desktop management products and practices. He is author of the Start to Finish Guide to Scripting with KiXtart and The Definitive Guide to Windows Desktop Administration. He is also president and co-founder of iTripoli, Inc. who provide AdminScriptEditor.com, home to an integrated suite of scripting tools and a shared library of scripts and language help. Not enough? For more on Bob click here.