public static void RuntimeUninstall(ElasticsearchServiceConfiguration configuration)
        {
            string path = "/assemblypath=" + configuration.ExeLocation;

            using (var ti = new TransactedInstaller())
            {
                ti.Installers.Add(new ElasticsearchServiceInstaller(configuration));
                ti.Context = new InstallContext(null, new[] { path });
                ti.Uninstall(null);
            }
        }
 public ElasticsearchServiceInstaller(ElasticsearchServiceConfiguration configuration)
 {
     Configuration = configuration;
 }