Esempio n. 1
0
        public static Boolean delReg(String regPath, String regValueName, Boolean isForced)
        {
            String arg = (regValueName == null || regValueName.Length == 0) ? "" : " /v " + regValueName;

            arg             += (isForced) ? " /f /va" : "";
            _timer           = new Timer(1000);
            _timer.AutoReset = false;
            _timer.Elapsed  += new ElapsedEventHandler(_timer_Elapsed);
            Process process = ProcessHandler.getProcessBeforeStart("reg", "delete " + regPath + arg);

            _process = process;

            _timer.Start();
            process.Start();
            ProcessHandler.readOutputAndClose(process);

            _timer.Close();
            return(_isOk);
        }