for the system folder you can use Environment.SystemDirectory , for the actual windows folder , i put this together quickly , hope it helps ....
Code:
Declare Function GetWindowsDirectory Lib "kernel32.dll" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As System.Text.StringBuilder, ByVal nSize As Integer) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim path As New System.Text.StringBuilder(255)
GetWindowsDirectory(path, path.Capacity)
MessageBox.Show(path.ToString)
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.