Well i have tried and tried. This seems so simple but i cant get the right variable or syntax.
Very simple: I need to clear a value in a registry key. Specifically the DefaultPassword value in winlogon. I can set the value to anything except a blank one. Why do i need to do this. The operation terminals (Running XP) use a defaut domain account that has a password of "blank" or no password at all. So when my custom program that handles code updates across the network it will also check DefaultUser, DefaultPassword , DefaultDomain, AdminAutoLogon and set them correctly if some how they are wrong. When i do a remotebasekey.s etvalue("Defaul tPassword","") instead of "blank" showing up in the registry, "Zero-length string" shows up??????? I have dried null and .tostring. Can someone tell me what I am doing wrong. My mind is about to explode.
Very simple: I need to clear a value in a registry key. Specifically the DefaultPassword value in winlogon. I can set the value to anything except a blank one. Why do i need to do this. The operation terminals (Running XP) use a defaut domain account that has a password of "blank" or no password at all. So when my custom program that handles code updates across the network it will also check DefaultUser, DefaultPassword , DefaultDomain, AdminAutoLogon and set them correctly if some how they are wrong. When i do a remotebasekey.s etvalue("Defaul tPassword","") instead of "blank" showing up in the registry, "Zero-length string" shows up??????? I have dried null and .tostring. Can someone tell me what I am doing wrong. My mind is about to explode.
Code:
Dim rk As Microsoft.Win32.RegistryKey = _ Microsoft.Win32.Registry.LocalMachine.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, strMachineName).OpenSubKey("Software\Microsoft\Windows NT\CurrentVersion\Winlogon", True) rk.SetValue("DefaultUserName", Me.textboxDefaultUserName.Text) If Me.textboxDefaultPassword.Text = "" Then MsgBox("Sorry I can't figure out why I cant set blank passwords yet.", MsgBoxStyle.Information) Else rk.SetValue("DefaultPassword", Me.textboxDefaultPassword.Text) End If
Comment