Here is an API and function that I use:
[tt]
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" _
(ByVal lpBuffer As String, ByVal nSize As Long) As Long
Public Function GetWindowsSystemDir()
Dim sBuffer As String
Dim X As Long
sBuffer = String(255, vbNullChar)
X = GetSystemDirectory(sBuffer, Len(sBuffer))
GetWindowsSystemDir = Left(sBuffer, X)
End Function
[/tt]
hope that helps, dont shoot me if it didnt (I'll be watching

) [sig]<p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href=
</a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
[/sig]