SystemDir



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

' The path of the System directory


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

(systemdir.html)- by Paolo Puglisi - Modifica del 25/3/2019