Reputation: 47
I want to get the "C:\WINDOWs" path if the operating system is on the another drive then "E:\WINDOWS". I used getenv("windir"), but i dont want this solution. what if i change the name of my environment variable.variable
Upvotes: 1
Views: 713
Reputation: 30035
The API SHGetFolderPath passing in CSLID_WINDOWS looks like what you need.
Upvotes: 0
Reputation: 11353
See windows API GetWindowsDirectory
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724454(v=vs.85).aspx
Upvotes: 3