c++ - Programmatic way to find the Windows OS volume? -


i understand not recommended assume drive letter c: reserved os volume. there straightforward way answer question - volume windows os reside on?. volume can drive letter or volume guid or other way volumes identified. note looking os partition not same system partition.

getwindowsdirectory() , break path _splitpath.

edit: changed getsystemdirectory getwindowsdirectory. in practice results should same.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -