Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经有一个包含映射驱动器信息的 bat 文件,但是有没有办法让 bat 重命名驱动器,以便在“我的计算机”中如何正确标记它们?
您可以像这样使用 comobject(powershell 代码):
$desc= "MyNetworkshare" # This is the label for your unit $mDrive = "H:\" #this is your unit (any letter you have..) $oShell = new-Object -com Shell.Application $oShell.NameSpace($mDrive).Self.Name = $Desc