package procat.avto;

import moduly.sbor.InfoPC;

import java.io.IOException;


public class Avtozagruzka {

    public static void setStartup(String name_unil_proc, String put_name_exe) {
        try {
            if (new InfoPC().isWindows()) {
                try {
                    Runtime.getRuntime().exec("reg add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /v " + name_unil_proc + " /t REG_SZ /d " + '"' + put_name_exe + '"');
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

