winfsp / sshfs-win

SSHFS For Windows
https://winfsp.dev
Other
5.1k stars 257 forks source link

Feature request: Set drive name #46

Open sganis opened 6 years ago

sganis commented 6 years ago

The parameter -o volname sets the volume name visible in the drive properties, next to the icon. The parameter -o FileSystemName is appended to the "FUSE" name in the File System attribute. However, the drive name is not set. I am modifying this registry key to set the name:

set REGKEY=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\##sshfs#user@host
reg add %REGKEY% /v _LabelFromReg /d DriveName /f
fifv commented 10 months ago

@sganis Thank you for letting me know where to modify the drive name, you are saving my life!

I used to modify source code in SSHFS-Win Manager to pass the extra args to sshfs.exe to mount as a Network Drive, and seems the VolumePrefix will be displayed as the drive name if reg is not modified.

`-oVolumePrefix=/ohmysshfs/${conn.name}`

But this must be an UNC path so the \\...\.. part can't be omitted, and special chars like :<> can't be used, just an ugly hack.