Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. package dbclient;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.InputStreamReader;
  5.  
  6. public class Test {
  7.  
  8. public static void main(String[] args) throws Exception {
  9. cstrikePath();
  10. }
  11.  
  12. //find steam path
  13. public static void cstrikePath() throws Exception {
  14. String line = null;
  15. int c = 0;
  16. Runtime runtime = Runtime.getRuntime();
  17. Process cmd = runtime.exec("reg query " + "HKCU\\Software\\Valve\\Steam\\ActiveProcess" );
  18. BufferedReader in = new BufferedReader(new InputStreamReader(cmd.getInputStream()));
  19. while ((line = in.readLine()) != null) {
  20. if(c == 6) break;
  21. c++;
  22. }
  23. in.close();
  24. String steamPath = line.substring(31);
  25. System.out.println("userid hex: " + steamPath);
  26.  
  27. //hax to decimal (not my code)
  28.  
  29. }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement