You can find it with a simple Win32 API call to [api]GetEnvironmentVariable[/api].
Public Class Win32API
'DWORD GetEnvironmentVariable(
' LPCTSTR lpName,
' LPTSTR lpBuffer,
' DWORD nSize
');
Public Declare Unicode Function GetEnvironmentVariableW Lib "kernel32.dll" _
(ByVal name As String, ByVal buffer As System.Text.StringBuilder, ByVal size As Integer) As Integer
End Class
Dim name As String = "ALLUSERSPROFILE"
Dim buffer As System.Text.StringBuilder = New System.Text.StringBuilder(32767)
Dim returnValue As Integer = Win32API.GetEnvironmentVariableW(name, buffer, buffer.Capacity)
MessageBox.Show("Return value: " & returnValue.ToString())
MessageBox.Show(buffer.ToString())