搜尋此網誌

2016年9月12日 星期一

windows mklink指示用法

vista以上才支援
直接於本機上對應一個folder至另一個folder,可以是local對local,local對remote,remote對local,remote對remote

設定好後,它看起來是像真的local folder,不是一個捷徑檔哦!

指示為mklink

參考


但是要注意其有權限之限定,
預設是~~~
本機至本機的符號連結已啟用
本機至遠端的符號連結已啟用
遠端至本機的符號連結已停用
遠端至遠端的符號連結已停用

如果設定的遠端至遠瑞的話需要於local端下指定開權限

可能因為權限不足,出現錯誤訊息0x800705B7: 因為符號連結的類型已停用,所以無法遵循符號連結
The symbolic link cannot be followed because its type is disabled.

請參考下列方法開權限:
https://blogs.msdn.microsoft.com/junfeng/2012/05/07/the-symbolic-link-cannot-be-followed-because-its-type-is-disabled/

When access a symbolic link on a file server, sometimes you may see the following error:

“The symbolic link cannot be followed because its type is disabled”

This is because by default remote to remote symbolic links are disabled. You can enable it with fsutil.

C:\Windows\system32>fsutil behavior query SymlinkEvaluation

Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
Remote to local symbolic links are disabled.
Remote to remote symbolic links are disabled.

C:\Windows\system32>fsutil behavior set SymlinkEvaluation R2R:1

C:\Windows\system32>fsutil behavior query SymlinkEvaluation

Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
Remote to local symbolic links are disabled.
Remote to remote symbolic links are enabled.

Be sure to run fsutil from elevated command prompt.


沒有留言:

張貼留言