How to rename or relabel a Network Drive label

Posted by Subhen on Stack Overflow See other posts from Stack Overflow or by Subhen
Published on 2010-12-16T11:41:32Z Indexed on 2010/12/27 10:54 UTC
Read the original article Hit count: 196

Filed under:
|
|

I am mounting a network drive to windows using WNetAddConnection2 which is working fine but while mounting the drive by default it assigns the name as Server IP and FolderName ,

NDSTestFolder on 'NAS server (172.24.17.116)'(R:)

I need to rename the drive label using SetVolumeLabel but this fails for the network drive saying invalid parameter while SetVolumeLabel works fine for the local drives.

Is there a way I can rename or relabel a network drive? So that I can change

NDSTestFolder on 'NAS server (172.24.17.116)'(R:)

to

NDS@MyFolder (R:)

© Stack Overflow or respective owner

Related posts about c++

Related posts about Windows