Hey guys,
I am attempting to search through a list of registry keys held in this location: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\
The keys are different on every PC as each key is for a specific user that has, at some point, logged into the machine. In each of these keys is a string entitled "ProfileImagePath" and it holds a value such as C:\Users\Username
I need to be able to search through each key and find the key that has the string for a specific username.
The following code deletes all strings in the folder, how do I search and only delete one? I will be grateful for any help I recieve.
I am attempting to search through a list of registry keys held in this location: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\
The keys are different on every PC as each key is for a specific user that has, at some point, logged into the machine. In each of these keys is a string entitled "ProfileImagePath" and it holds a value such as C:\Users\Username
I need to be able to search through each key and find the key that has the string for a specific username.
The following code deletes all strings in the folder, how do I search and only delete one? I will be grateful for any help I recieve.
Code:
Dim MyReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, strComputer)
Dim MyRegKey As Microsoft.Win32.RegistryKey
MyRegKey = MyReg.OpenSubKey("Software\Microsoft\Windows NT\CurrentVersion\", True)
MyRegKey.DeleteSubKeyTree("ProfileList", True)
MyRegKey.Close()