aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Uninstall/Program.cs
blob: 4374e970cd339c1cfdd261ccdf481e0bd991fc72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using MediaBrowser.ClickOnce;
using System;
using System.IO;

namespace MediaBrowser.Server.Uninstall
{
    /// <summary>
    /// Class Program
    /// </summary>
    class Program
    {
        /// <summary>
        /// Defines the entry point of the application.
        /// </summary>
        /// <param name="args">The args.</param>
        static void Main(string[] args)
        {
            new ClickOnceHelper(Globals.PublisherName, Globals.ProductName, Globals.SuiteName).Uninstall();

            // Delete all files from publisher folder and folder itself on uninstall
            
            var publisherFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Globals.PublisherName);
            
            if (Directory.Exists(publisherFolder))
            {
                Directory.Delete(publisherFolder, true);
            }
        }
    }
}