I am searching for a code to create a virtual drive. I came across the DefineDosDevice API Function but I have one big Problem with that Function. I can t change the VolumeLabel of the created Drive.
creating virtual hard Drive here is one example. If you use SetVolumeName with that drive you get an error returned.
May anyone has an idea how to do solve my problem?
You can’t set the volume name of a “DosDevice” because there is no place where it can be stored. A physical volume usually has a hidden meta-data (like
$VOLUMEor so for NTFS) file to store the volume name. No such location exists for a virtual device because it’s just an alias for a folder).