Is there som way to tell what the windows system directory is. I know that I can tell ther version of the os but that does not always tell you what the windows system dir is?
Thanks Scott
Printable View
Is there som way to tell what the windows system directory is. I know that I can tell ther version of the os but that does not always tell you what the windows system dir is?
Thanks Scott
Declare this function in a code module: Public Declare Function GetSystemDirectory Lib "kernel32" Alias _
"GetSystemDirectoryA" (ByVal lpbuffer As String, ByVal nSize As Long) As Long
Example
Public Function fnc_sGetWinSysDir() As String
'Returns the windows system folder. i.e. "C:\WINNT\SYSTEM32"
'or "C:\WINDOWS\SYSTEM"
Dim lpbuffer As String * 144
Dim Length%
Length% = GetSystemDirectory(lpbuffer, Len(lpbuffer))
fnc_sGetWinSysDir = Left(lpbuffer, Length%)
End Function
Thanks that works great!
I posted an answer to this qestion about 2 days ago! I'm not being snappy, but there are probably about 100 posts on this site asking the same thing. Do a search first before posting... (same goes for everyone asking about bloody key hooks!)
Anywayz, just stating the obvious.
Laterz
REM
Actually this was his first post and he is new to the site so he probably doesn't know about searching yet.