Exemplo n.º 1
0
        private static void ApplyUpdate(IUpdate instance, string processToKill)
        {
            Log.Entry(LogName, "Shutting down service...");
            instance.StopService();

            Log.Entry(LogName, "Killing remaining processes...");
            ProcessHandler.KillAllEXE(processToKill);
            Log.Entry(LogName, "Applying update...");
            instance.ApplyUpdate();

            Log.Entry(LogName, "Starting service...");
            instance.StartService();

            if (File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "updating.info")))
            {
                File.Delete(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "updating.info"));
            }
        }