0

Hi all,

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?

Best Regards
Vega

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Jx_Man
2

You mean system directory?

See if this helps :

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
End Sub
Votes + Comments
Perfect
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.