Does anyone know how to determine if the guest account is disabled on a
remote computer on the server? I was thinking I could read a registry key to
do it, but I do not know if such a key exists. Below is code showing how I
determine if CTRL+ALT+DEL is required to logon to the remote machine using
the registry. If it is not required then I change the key to make it
required. I was hoping I could do something similar for the guest account. If
anyone knows of a registry key for the guest account please let me know, or
if you know of another way to check the guest account on the remote computer.
Thanks in advance.
subkey = "Software\Microsoft\Windows NT\CurrentVersion\Winlogon"
regKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMa chine,
pc).OpenSubKey(subkey, True)
value = regKey.GetValue("disableCAD")
If value = "1" Then
ListBox1.Items.Add("Disable CTRL+ALT+DEL requirement for Logon: Enabled")
regKey.SetValue("disableCAD", 0)
ListBox1.Items.Add("Policy changed to correct setting. Now Disabled")
Else
ListBox1.Items.Add("Disable CTRL+ALT+DEL requirement for Logon: Disabled")
End If