============================================== Function SystemDirectory () As String Dim WinPath As String WinPath = String(145, Chr(0)) SystemDirectory = Left(WinPath, GetSystemDirectory(WinPath, Len(WinPath))) End Function ============================================== Function WindowsDirectory () As String Dim WinPath As String WinPath = String(145, Chr(0)) WindowsDirectory = Left(WinPath, GetWindowsDirectory(WinPath, Len(WinPath))) End Function