Dim value Dim localKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, strComputer, RegistryView.Registry64) localKey = localKey.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI") Dim value64 = localKey.GetValue("LastLoggedOnUser") Dim localKey32 = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, strComputer, RegistryView.Registry32) localKey32 = localKey32.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI") Dim value32 = localKey32.GetValue("LastLoggedOnUser") If value64 = Nothing Then value = value32 Else value = value64 End If MsgBox(value.ToString)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)