Symbolic link in Windows Vista
You can create symbolic link in Windows Vista now.
C:\test>ver
Microsoft Windows [Version 6.0.5365]
C:\test>mklink
Creates a symbolic link.
MKLINK [[/D] | [/H] | [/J]] Link Target
/D Creates a directory symbolic link. Default is a file
symbolic link.
/H Creates a hard link instead of a symbolic link.
/J Creates a Directory Junction.
Link specifies the new symbolic link name.
Target specifies the path (relative or absolute) that the new link
refers to.
C:\test>mklink foo c:\Windows\system32\notepad.exe
symbolic link created for foo <<===>> c:\Windows\system32\notepad.exe
C:\test>dir
Volume in drive C has no label.
Volume Serial Number is 2211-7428
Directory of C:\test
04/14/2006 11:24 AM <DIR> .
04/14/2006 11:24 AM <DIR> ..
04/14/2006 11:24 AM <SYMLINK> foo [c:\Windows\system32\notepad.exe]
1 File(s) 0 bytes
2 Dir(s) 69,238,722,560 bytes free
C:\test>mklink /d bar c:\windows
symbolic link created for bar <<===>> c:\windows
C:\test>dir
Volume in drive C has no label.
Volume Serial Number is 2211-7428
Directory of C:\test
04/14/2006 11:24 AM <DIR> .
04/14/2006 11:24 AM <DIR> ..
04/14/2006 11:24 AM <SYMLINKD> bar [c:\windows]
04/14/2006 11:24 AM <SYMLINK> foo [c:\Windows\system32\notepad.exe]
1 File(s) 0 bytes
3 Dir(s) 69,238,722,560 bytes free
C:\test>del foo
C:\test>dir
Volume in drive C has no label.
Volume Serial Number is 2211-7428
Directory of C:\test
04/14/2006 11:24 AM <DIR> .
04/14/2006 11:24 AM <DIR> ..
04/14/2006 11:24 AM <SYMLINKD> bar [c:\windows]
0 File(s) 0 bytes
3 Dir(s) 69,238,722,560 bytes free
C:\test>rd bar
C:\test>dir
Volume in drive C has no label.
Volume Serial Number is 2211-7428
Directory of C:\test
04/14/2006 11:24 AM <DIR> .
04/14/2006 11:24 AM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 69,238,722,560 bytes free
(By default only administrators can create symbolic link. You can override the decision using secpol.msc.)
Documentation of symbolic link can be found in MSDN
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/symbolic_links.asp
Comments
Anonymous
April 15, 2006
Why admin only by default?Anonymous
April 15, 2006
Really great news!Anonymous
April 15, 2006
It's the same as creating junctions in any other NTFS 5.0 volume with sysinternals or Win 2003 resource kit tools, isn't it?Anonymous
April 15, 2006
Err, ok, on second thought - it must be a hybrid of some kind since the junctions work only for directories. Sorry for the fuss. ;)Anonymous
April 15, 2006
How is this different than hardlinks in XP.
fsutil
Can it span volumes?Anonymous
April 16, 2006
It is the same as hardlink vs symlink in Unix.
I believe it can span volumes, as I can create a symlink to an UNC path.Anonymous
April 16, 2006
The comment has been removedAnonymous
April 16, 2006
Norman,
Again, I don't work in File System team so I can't answer any of your questions.Anonymous
April 21, 2006
Looking at the documentation, it is unclear how to determine (programmatically) that a directory entry is a symbolic link, and there seems to be no API to get the contents (i.e. target path name) of the link.Anonymous
June 22, 2006
This is great. I love the symbolic link idea.
I did not see anywhere in your example or in the MS doc wheather or not deleting the link deletes the object that it links to (a weakness of "junction points"). But I will assume that it does not (hopefully you didn't delete your windows directory), so, groovy.
I hope they work it into the GUI.Anonymous
October 02, 2006
PingBack from http://www.hanselman.com/blog/MoreOnVistaReparsePoints.aspxAnonymous
October 21, 2006
re: Windows Vista 体験記 - mklinkAnonymous
November 28, 2006
A new but low-level addition to Vista is the support for symbolic links in the file system. These are...Anonymous
February 27, 2007
PingBack from http://www.jpserve.net/blog/?p=42Anonymous
March 04, 2007
Depois de pesquisar acabei descobrindo que as JUNCTIONS existem no sistema operacional desde...Anonymous
May 10, 2007
Columbia Enterprise Developers Guild BeginsAnonymous
May 10, 2007
A couple of months ago, I began searching for local developer user groups to take part in Columbia, SC. Unfortunately, there didn’t seem to be a lot going on. I ended up heading to the Charlotte Enterprise Developers Guild to get my fix. There,Anonymous
May 21, 2007
PingBack from http://www.vistax64.com/vista-performance-maintenance/65105-shortcuts-allways-breaking.html#post317829Anonymous
November 08, 2007
PingBack from http://blog.theburrowfamily.net/2007/11/08/whew/Anonymous
January 14, 2008
PingBack from http://iainmagee.wordpress.com/2008/01/15/junction-links-symbolic-links/Anonymous
January 25, 2008
PingBack from http://softwareinformation.247blogging.info/junfeng-zhangs-windows-programming-notes-symbolic-link-in-windows-vista/Anonymous
March 10, 2008
PingBack from http://www.evileyez.org/true-symlinks-in-windows-vista/Anonymous
March 16, 2008
PingBack from http://frankthefrank.info/entry.php?id=kwws%3d22eorjv1pvgq1frp2mxqihqj2dufklyh2533923724828%3a989%3b1dvs%7bAnonymous
April 04, 2008
PingBack from http://www.ericmmartin.com/symbolic-links-in-windows/Anonymous
August 18, 2008
PingBack from http://theiceman.israel-serv.co.il/blog/2008/08/using-symbolic-link-in-vista/Anonymous
December 14, 2008
PingBack from http://www.titanquest.net/forums/tools/27590-tqvault-lilith-mod.html#post298896