-
Get windows directory
How can I find out the windows directory using c++? I know it's usually C:\WINDOWS\ however what if the root drive is D, or even the path is different (E:\MyWINDOWS?).
I'm just curious if theres a function like GetEnvironmentVariable ( "%WINDOWSDIR", str ) which would put the value into str or whatever.
Thanks,
Matt
-
It's easy with Win32 API.
All you would do is call GetWindowsDirectory!
Good luck. Reply if you have any troubles.
-
-
You should learn how to search first, for so newbies questions...
The first link for "windows directory"
gives the answer on Google Groups in win32 api newsgroup
http://groups.google.com/group/comp....dans+ce+groupe
and it was in 1999...