Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i want to create the soft link in windows using vbscript
please help me
Posted
Comments
Sergey Alexandrovich Kryukov 1-Mar-12 12:01pm    
This is an interesting question in general, but VBScript... I doubt it. I voted 4 for the question.
--SA

1 solution

This is an interesting question, but VBScript… I doubt it.

NTFS supports POSIX, so it can work with both "soft links" and "hard links": create and removed them, examine file structure to find the links or determine if two or more different files are hard-linked together, so they represent the same physical file in different locations of the file system. Thanks to these two features, NFTS is not a tree, but can be presented as a graph of any general structure, possibly with circular references. Many usual file search algorithms would fail, going into infinite loops.

I've use the both, but using raw Windows API.

For the soft link, the Windows keyword is "reparse point". You can find a lot of useful information:
http://bit.ly/wAnTYt[^].

Please see:
http://en.wikipedia.org/wiki/Reparse_point[^].
http://msdn.microsoft.com/en-us/library/aa365503%28v=VS.85%29.aspx[^].

You can use the utility from Windows Sysinternals called Junction. You can download it and just execute it from your script:
http://technet.microsoft.com/en-us/sysinternals/bb896768[^].

If I'm not much mistaken, in the past Mark Russinovich offered the source code of this utility, where you could learn how it works, but now I cannot find it.

By the way, the Sysinternals Suite is a very good set of utilities, something every developer should have:
http://technet.microsoft.com/en-us/sysinternals/bb842062[^].

—SA
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900