WindowDir




Private Declare Function GetWindowsDirectory Lib "kernel32" Alias _
"GetWindowsDirectoryA" (ByVal lpBuffer As String, _
ByVal nSize As Long) As Long

' Return the path of the Windows directory


Function WindowsDirectory() As String
Dim buffer As String * 512, length As Integer
length = GetWindowsDirectory(buffer, Len(buffer))
WindowsDirectory = Left$(buffer, length)
End Function










( windowdir.html )- by Paolo Puglisi - Modifica del 17/12/2023