import com.registry.RegistryKey;
import com.registry.RegistryValue;
public class RegeditTest {
public static void readRegedit(){
RegistryKey rk = RegistryKey.listRoots()[RegistryKey.HKEY_LOCAL_MACHINE_INDEX];
/*RegistryKey hardware = new RegistryKey(rk, "HARDWARE");
RegistryKey devicemap = new RegistryKey(hardware, "DEVICEMAP");
RegistryKey serialcomm = new RegistryKey(devicemap,"SERIALCOMM");*/
RegistryKey serialcomm = new RegistryKey(rk,"HARDWARE//DEVICEMAP//SERIALCOMM");
// RegistryKey video = new RegistryKey(devicemap, "VIDEO");
// System.out.println(serialcomm.get);
RegistryValue rValue = serialcomm.getValue("//Device//VCP0");
System.out.println(rValue.toString());
/*List<RegistryKey> subKeys = video.getSubKeys();
for (RegistryKey registryKey : subKeys) {
System.out.println(registryKey.getName());
}*/
}
public static void main(String[] args) {
readRegedit();
}
}