Código: Seleccionar todo
public static final String readRegistry(String location, String key)
{
try
{
Process process = Runtime.getRuntime().exec("reg query \"" + location + "\" /v " + key);
Main.StreamReader reader = new Main.StreamReader(process.getInputStream());
reader.start();
process.waitFor();
reader.join();
String[] parsed = reader.getResult().split("\\s+");
if (parsed.length > 1)
return parsed[(parsed.length - 1)];
}
catch (Exception localException) {
}
return null;
}