T
Ty Moffett
Below is a function that I would like to add 3 values to the registry in order to have Windows 2000/XP to logon automatically. The three values are DefaultUserName, AutoAdminLogon, and DefaultPassword and should be added in this location: HKLM\Software\Microsoft\Windows NT\Current Version\Winlogon. The DefaultUserName already exists but the other 2 need to be created.
After running my code the 3 values are not created or changed. I can't figure it out. Can anyone offer some advice?
Imports Microsoft.Win32
Module HandsOff
Public Sub main()
AutoLogon()
End Sub
Public Sub AutoLogon()
Dim rk As RegistryKey = Registry.LocalMachine.CreateSubKey("Software\Microsoft\Windows NT\Current Version\Winlogon")
rk.SetValue("DefaultUserName", "Administrator")
rk.SetValue("AutoAdminLogon", "1")
rk.SetValue("DefaultPassword", "solarcit")
End Sub
End Module
After running my code the 3 values are not created or changed. I can't figure it out. Can anyone offer some advice?
Imports Microsoft.Win32
Module HandsOff
Public Sub main()
AutoLogon()
End Sub
Public Sub AutoLogon()
Dim rk As RegistryKey = Registry.LocalMachine.CreateSubKey("Software\Microsoft\Windows NT\Current Version\Winlogon")
rk.SetValue("DefaultUserName", "Administrator")
rk.SetValue("AutoAdminLogon", "1")
rk.SetValue("DefaultPassword", "solarcit")
End Sub
End Module