Categories

change drive name

Private Declare Function SetVolumeLabelA Lib “kernel32″ _
(ByVal lpRootPathName As String, _
ByVal lpVolumeName As String) As Long

Public Function SetVolumeName(sDrive As String, n As String) As Boolean
Dim i As Long

i = SetVolumeLabelA(sDrive + “:” & Chr$(0), n & Chr$(0))

SetVolumeName = IIf(i = 0, False, True)
End Function

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

You must be logged in to post a comment.