Although I’m running VB 6.0, I’ve only installed service pack 2 (service pack 4 is downloading as I speak). I’m also still using Windows 95. Are C:\Windows\Temp and C:\Windows\System the usual Temp and System directories for Windows 98, 2000, and ME? Are C:\WinNT\Temp and C:\WinNT\System32 the usual Temp and System directories for NT? Are the following Windows API calls the best way of getting the operating system, system directory path, and temp directory path?

Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" _ (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal _ nBufferLength As Long, ByVal lpBuffer As String) As Long
Declare Function GetVersion Lib "kernel32" Alias "GetVersionExA" (ByRef _ lpVersionInformation As OSVERSIONINFO) As Long

lpVersionInformation.dwPlatformId returns 0 for Windows 3.x, 1 for Windows 95, and for NT. The SysInfo control’s .OSPlatform property appears to return the same values. What do they return for Windows 98, 2000, and ME?

Environ(i) returns strings such as "TEMP=C:\WINDOWS\TEMP" and "windir=C:\WINDOWS” for various values of i in Windows 95. Is the same true in Windows 98, 2000, and ME? Does it return "windir=C:\WINNT” for NT in most cases?

John Fritch