I am writing a program in VB6 where I need to determine the path for the system32 folder.
I know the default path is c:\WINDOWS\Sytem32, but some people installed they windows in another drive.
How i can get the path of system32 folder?
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Sub Form_Load()
Dim sSave As String, Ret As Long
sSave = Space(255)
Ret = GetSystemDirectory(sSave, 255)
sSave = Left$(sSave, Ret)
MsgBox "Windows System directory: " + sSave