This project is read-only.

requesting logical device name from kernel path

Apr 1, 2009 at 9:37 AM
sorry to bother you guys again,

but i wonder if the getSnapshotDeviceName is suported in alphaVSS.
cause i need to request the original device name of the shadow copy's

so i want to know from wich disk each copy is, but i only know the kernel path
normally its the getsnapshotdevicename the methode in C++ (i think)
so is it possible?

ty,
Apr 1, 2009 at 10:07 AM
I don't know of the method you're mentioning (Google didn't turn up anything either). The snapshot properties returned by the enumeration should contain all the information that is available from VSS.
If you want to convert the long unicode path returned to a normal path (such as D:\ or whatever), I sugges you take a look at AlphaFS (another one of my libraries also available here at codeplex), and more specifically the Volume class which has methods such as GetDisplayNameForVolume which could provide you with what you want. (Or you could take a look at the SDK sample VShadow.exe which accomplishes this in much the same way).

Hope this helps.

Apr 1, 2009 at 10:32 AM
ty for your reply,

to be honest i have found it out
like you said i need to use ALphaFS

so what ive done is

//snapProp = properties of a snapshot (VssSnapshotProperties)

string kernelpath =  snapProp.OriginalVolumeName;
string vol = Volume.GetDisplayNameForVolume(kernelpath");
                        MessageBox.Show(vol);

ant this gives me C:/ for a snapshot of my C disk.. and that is what i wanted
so now i am able to convert a path like \\?\Volume{61c08f3c-fd05-11dd-ae4a-806e6f6e6963}\
to C:/

sorry that i asked you when the solution was so simple, but i didn't find a thing for a day
and when i looked at the source of vss,there was no "getSnapshotDeviceName" method

either way, thank you