Ejemplo n.º 1
0
        public void run()
        {
            if (globals.QboxAppState == false)
            {
                Process p = new Process();
                p.StartInfo.FileName  = "rundll32.exe"; //Run the uninstall executable with the uninstall string
                p.StartInfo.Arguments = "dfshim.dll,ShArpMaintain QBoxClient.application, Culture=en, PublicKeyToken=c7c5fb3875c039a3, processorArchitecture=x86";
                p.Start();
                p.WaitForExit();
                if (globals.systemDataUninstall == true)
                {
                    //string[] s = System.IO.Directory.GetDirectories(@"C:\Users\", "*"); //Delete the system data files
                    string dataLoc = @"C:\Users\" + globals.user + @"\AppData\Local\CoralTree";     //adds the rest of the path to the user found via wildcard
                    if (System.IO.Directory.Exists(dataLoc))
                    {
                        try
                        {
                            System.IO.Directory.Delete(dataLoc, true);
                        }

                        catch (System.IO.IOException a)
                        {
                            Console.WriteLine(a.Message);
                        }
                    }
                }
                Window3 openWindow = new Window3();
                openWindow.Show();
            }
        }
Ejemplo n.º 2
0
        private void yes_Click(object sender, RoutedEventArgs e)
        {
            Process p = new Process();

            p.StartInfo.FileName  = "rundll32.exe"; //Run the uninstall executable with the uninstall string
            p.StartInfo.Arguments = "dfshim.dll,ShArpMaintain QBoxClient.application, Culture=en, PublicKeyToken=c7c5fb3875c039a3, processorArchitecture=x86";
            p.Start();
            p.WaitForExit();
            if (System.IO.File.Exists(@"C:\Users\Chaitanya\Desktop\Qbox Client.appref-ms"))
            {
                MessageBox.Show("Please close all files using Qbox to uninstall and try again"); //if the uninstall did not work, it resets to the main window
                Application.Current.MainWindow.Show();
            }
            Window3 openWindow = new Window3();

            openWindow.Show();
            this.Close();
        }
Ejemplo n.º 3
0
        private void yes_Click(object sender, RoutedEventArgs e)
        {
            Process p = new Process();

            p.StartInfo.FileName  = "rundll32.exe"; //uninstall executable with the uninstall string
            p.StartInfo.Arguments = "dfshim.dll,ShArpMaintain QBoxClient.application, Culture=en, PublicKeyToken=c7c5fb3875c039a3, processorArchitecture=x86";
            p.Start();                              //Run windows uninstall
            p.WaitForExit();
            if (System.IO.File.Exists(@"C:\Users\Chaitanya\Desktop\Qbox Client.appref-ms"))
            {
                MessageBox.Show("Please close all files using Qbox to uninstall and try again"); //if the uninstall fails, resets to the main window
                Application.Current.MainWindow.Show();
                this.Close();
                return;
            }
            string[] s = System.IO.Directory.GetDirectories(@"C:\Users\", "*"); //Delete the system data files
            foreach (string str in s)
            {
                string test = str + @"\AppData\Local\CoralTree"; //adds the rest of the path to the user found via wildcard
                if (System.IO.Directory.Exists(@test))
                {
                    try
                    {
                        System.IO.Directory.Delete(@test, true);
                    }

                    catch (System.IO.IOException a)
                    {
                        Console.WriteLine(a.Message);
                    }
                }
            }
            Window3 openWindow = new Window3();

            openWindow.Show();
            this.Close();
        }