473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

OpenRemoteBaseKey

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.setvalue("DefaultPassword","") 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.

Expand|Select|Wrap|Line Numbers
  1. Dim rk As Microsoft.Win32.RegistryKey = _
  2.         Microsoft.Win32.Registry.LocalMachine.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, strMachineName).OpenSubKey("Software\Microsoft\Windows NT\CurrentVersion\Winlogon", True)
  3.         rk.SetValue("DefaultUserName", Me.textboxDefaultUserName.Text)
  4.         If Me.textboxDefaultPassword.Text = "" Then
  5.             MsgBox("Sorry I can't figure out why I cant set blank passwords yet.", MsgBoxStyle.Information)
  6.         Else
  7.             rk.SetValue("DefaultPassword", Me.textboxDefaultPassword.Text)
  8.         End If
Nov 13 '07 #1
2 1884
Someone help, please.
Nov 13 '07 #2
Killer42
8,435 Expert 8TB
Well, I don't know anything about it. But since you sound desperate, I'll throw in my two cents' worth.
  • Have you tried using a space instead of an empty string?
  • Are you sure "Zero-length string" is really a problem? Perhaps this is Ok.

You might also try the Windows or .Net forum for this one, as it's really not anything specific to VB.
Nov 14 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Cherry | last post by:
Hi, can I access the registry of a remote machine using VB.NET? While connecting to the remote machine I would be using the admin login of that machine. Thanks.
0
by: csharp_helpwanted | last post by:
steps.. first, I'm creating a connection by mapping a network drive to the pc second, the map drive connection was successful I try to read a certian registry key/value (that is a valid reg...
0
by: g82martin | last post by:
I am using the RegistryKey class to access the registry on remote machines. I only require read access. I am able to successfully read registry keys under HKLM\Software\Microsoft\Windows...
21
by: Kevin Swanson | last post by:
I'm attempting some remote registry manipulation via C#. I've written a test app to simply grab a specified key from a specified hive on a specified machine. The call to OpenSubKey is throwing...
1
by: Justin | last post by:
I am attempting to access the following registry HKEY_LOCAL_MACHINE\Security\Policy\PolyAdtEv using the following code. This registry has a binary representation of the settings of the audit...
2
by: Jenna | last post by:
In my test form, WebForm1.aspx.vb, this code successfully connects to the remote registry: Try Dim RegTo As Microsoft.Win32.RegistryKey =...
2
by: zoneal | last post by:
my program it's just tools for my little home network.. Only thing I have left to do is reading the registy key to check the path to the shared folder.. this path is always updated so I will...
2
by: Jerry Spence1 | last post by:
I am trying to get registry information from another PC that is not part of a domain.I have tried the following: Dim key = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,...
3
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
Hi: I'm looking for an example of modifying the registry of a remote system. Thanks much! Charles
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.