开发者

Programmatic way to find the Windows OS volume?

I understand it is not recommended to assume that drive letter C: is reserved for the OS volume. So is there a straightforward way to answer the question - what volume does 开发者_Go百科the Windows OS reside on?. Volume can be a drive letter or a volume GUID or any other way that volumes are identified. Note that I am looking for the OS partition which is not the same as the System partition.


GetWindowsDirectory() and then break up the path with _splitpath.

Edit: Changed GetSystemDirectory with GetWindowsDirectory. In practice results should be the same.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜