I have this code:
import java.io.*; //By José D. Hernández, 2012. public class other { public static void main(String args[]) throws IOException, InterruptedException { Runtime runtime = Runtime.getRuntime(); Process process = runtime.exec("reg query HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Korbel\\TERMSVR1 /v Certified"); InputStream is = process.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { System.out.println(line); } } }
This code will search for that windows registry key and print out something like this:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Korbel\TERMSVR1 Certified REG_SZ Pos001
Is there any possible way to only print out "Pos001", but Poss001 is only an example, there could be anything, so I'm trying to print out wherever is in the position of Pos001, or if is possible wherever arguments that are in "HKCU\Software\Microsoft\Windows\CurrentVersion\Ko rbel\TERMSVR1 /v Certified" Which in this case is "Pos001"
Thanks.