954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

System32 Folder

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

Vega_Knight
Light Poster
36 posts since Feb 2008
Reputation Points: 18
Solved Threads: 0
 

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
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: