Dim RemoteUsersHive As RegistryKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.Users, usbdTextBox1.Text) Dim SubKeys() As String = RemoteUsersHive.GetSubKeyNames For i As Integer = 0 To SubKeys.Length - 1 If SubKeys(i).Length <> 0 Then Dim CurrentKey As RegistryKey = RemoteUsersHive.OpenSubKey(SubKeys(i), True) Try CurrentKey = CurrentKey.OpenSubKey("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\USBSTOR", True) CurrentKey.SetValue("Start", 4) Catch ex As Exception MessageBox.Show("Done") End Try CurrentKey = Nothing End If Next
CurrentKey.OpenSubKey
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)