The information in this article applies to:
SUMMARY
This article illustrates how to use the GetWindowsDirectory and GetSystemDirectory functions of the WIN32API to capture the paths to the Windows and Windows\System directories. MORE INFORMATION
Within some applications, it may be necessary to programmatically determine the path to the WINDOWS and/or WINDOWS\SYSTEM directories. By default, Windows 95 and Windows 98 are installed to the WINDOWS directory. Similarly, the default installation directory for Microsoft Windows NT 4.0 is the WINNT directory. While those are default installation paths, users may change the path to which the operating system files are copied.
The following code illustrates how to use the GetWindowsDirectory and GetSystemDirectory functions of the WIN32API to return the paths to the Windows and System directories. The GetWindowsDirectory function returns the path of the Windows directory. Under Windows 95 and Windows 98, the Windows directory would normally be C:\WINDOWS. Using Windows NT 4.0, the Windows directory would usually be C:\WINNT. The GetSystemDirectory function returns the path of the System directory. With Windows 95 and Windows 98, that would normally be C:\WINDOWS\SYSTEM. Under Windows NT 4.0, the system files would normally be copied to C:\WINNT\SYSTEM32.
REFERENCES(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by John Desch, Microsoft Corporation. Additional query words: KBDSE
Keywords : kbAPI kbVFp300b kbVFp500 kbVFp500a kbVFp600 kbGrpFox kbDSupport kbCodeSnippet |
Last Reviewed: August 31, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |