Update Stub

fix uninstall feature
This commit is contained in:
NYAN CAT 2019-04-16 05:29:32 -07:00
parent ed59bc3449
commit 747d31611e
3 changed files with 10 additions and 0 deletions

View File

@ -200,6 +200,7 @@
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Builder"; this.Name = "Builder";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Builder"; this.Text = "Builder";
this.Load += new System.EventHandler(this.Builder_Load); this.Load += new System.EventHandler(this.Builder_Load);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);

View File

@ -1,6 +1,7 @@
using Client.Helper; using Client.Helper;
using Client.MessagePack; using Client.MessagePack;
using Client.Sockets; using Client.Sockets;
using Microsoft.Win32;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
@ -222,6 +223,14 @@ namespace Client.Handle_Packet
private static void Uninstall() private static void Uninstall()
{ {
if (Convert.ToBoolean(Settings.Install))
{
try
{
Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run\").DeleteValue(Path.GetFileName(Settings.ClientFullPath));
}
catch { }
}
ProcessStartInfo Del = null; ProcessStartInfo Del = null;
try try
{ {