Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            //注册表操作初始化
            ClsRegedit RegContral = new ClsRegedit("SdtuTools");

            //清理注册表
            try
            {
                RegContral.DeleteSubKey("StduTools");
            }
            catch { }
            try
            {
                RegistryKey key    = Registry.CurrentUser;
                RegistryKey SubKey = key.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion", true).CreateSubKey("Run");
                SubKey.DeleteValue("StduTools");
            }
            catch { }
            MessageBox.Show("卸载完成!");
            Application.Exit();
        }
Beispiel #2
0
 private void frmGetRemain_FormClosing(object sender, FormClosingEventArgs e)
 {
     //释放注册表操作
     RegContral = null;
     Application.Exit();
 }