Dou*_*xem 50
您可以在 Windows 中使用subst命令。
subst m: c:\foo
Run Code Online (Sandbox Code Playgroud)
要进行持久重定向,您可以编辑注册表。将字符串 (REG_SZ) 值添加到:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices
Run Code Online (Sandbox Code Playgroud)
将值的名称设置为驱动器号(例如M:),然后将数据设置为:
\??\C:\foo\foosub
Run Code Online (Sandbox Code Playgroud)
此方法适用于登录和重新启动。我在 Windows 2008 上对此进行了测试,因此它也应该适用于 Vista、XP、2003 和 2000。
小智 7
Subst 也适用于 Vista:
C:\Users\juan>subst /?
Associates a path with a drive letter.
SUBST [drive1: [drive2:]path]
SUBST drive1: /D
drive1: Specifies a virtual drive to which you want to assign a path.
[drive2:]path Specifies a physical drive and path you want to assign to
a virtual drive.
/D Deletes a substituted (virtual) drive.
Type SUBST with no parameters to display a list of current virtual drives
Run Code Online (Sandbox Code Playgroud)
.
将驱动器 (M:) 映射到 \\yourcomputername\myshare
| 归档时间: |
|
| 查看次数: |
37356 次 |
| 最近记录: |