Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package dbclient;
- import java.io.BufferedReader;
- import java.io.InputStreamReader;
- public class Test {
- public static void main(String[] args) throws Exception {
- cstrikePath();
- }
- //find steam path
- public static void cstrikePath() throws Exception {
- String line = null;
- int c = 0;
- Runtime runtime = Runtime.getRuntime();
- Process cmd = runtime.exec("reg query " + "HKCU\\Software\\Valve\\Steam\\ActiveProcess" );
- BufferedReader in = new BufferedReader(new InputStreamReader(cmd.getInputStream()));
- while ((line = in.readLine()) != null) {
- if(c == 6) break;
- c++;
- }
- in.close();
- String steamPath = line.substring(31);
- System.out.println("userid hex: " + steamPath);
- //hax to decimal (not my code)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement