mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-23 03:46:10 +00:00
f2ac1ece55
add
75 lines
3.0 KiB
C#
75 lines
3.0 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: OnlineBackup.SchedulerService.SchedulerSvcTestInstaller
|
|
// Assembly: OnlineBackup.SchedulerService, Version=1.0.0.2239, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 957E6A86-11F3-41A3-AA04-CA4B20FE5494
|
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Packed.Win32.Katusha.b-66626718efb1bc294ca4154d634f0bc3bcf8a0aa5f41503d7aa582fb7920e9f4.exe
|
|
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using System.Configuration.Install;
|
|
using System.ServiceProcess;
|
|
|
|
namespace OnlineBackup.SchedulerService
|
|
{
|
|
[RunInstaller(true)]
|
|
public class SchedulerSvcTestInstaller : Installer
|
|
{
|
|
private ServiceProcessInstaller _service_process_installer;
|
|
private ServiceInstaller _service_installer;
|
|
private ServiceController _control;
|
|
|
|
public SchedulerSvcTestInstaller() => this.InstallService();
|
|
|
|
public override void Commit(IDictionary savedState)
|
|
{
|
|
base.Commit(savedState);
|
|
this._control = new ServiceController("OnlineBackupSchedulerService");
|
|
using (this._control)
|
|
{
|
|
if (!this._control.Status.Equals((object) ServiceControllerStatus.StartPending) && !this._control.Status.Equals((object) ServiceControllerStatus.Running))
|
|
this._control.Start();
|
|
this._control.Close();
|
|
}
|
|
}
|
|
|
|
public override void Rollback(IDictionary savedState)
|
|
{
|
|
base.Rollback(savedState);
|
|
this._control = new ServiceController("OnlineBackupSchedulerService");
|
|
using (this._control)
|
|
{
|
|
if (this._control.Status.Equals((object) ServiceControllerStatus.StartPending) || this._control.Status.Equals((object) ServiceControllerStatus.Running))
|
|
this._control.Stop();
|
|
this._control.Close();
|
|
}
|
|
}
|
|
|
|
public override void Uninstall(IDictionary savedState)
|
|
{
|
|
this._control = new ServiceController("OnlineBackupSchedulerService");
|
|
using (this._control)
|
|
{
|
|
if (this._control.Status.Equals((object) ServiceControllerStatus.StartPending) || this._control.Status.Equals((object) ServiceControllerStatus.Running))
|
|
this._control.Stop();
|
|
this._control.Close();
|
|
}
|
|
base.Uninstall(savedState);
|
|
}
|
|
|
|
private void InstallService()
|
|
{
|
|
this._service_process_installer = new ServiceProcessInstaller();
|
|
this._service_installer = new ServiceInstaller();
|
|
this._service_process_installer.Account = ServiceAccount.LocalSystem;
|
|
this._service_process_installer.Username = (string) null;
|
|
this._service_process_installer.Password = (string) null;
|
|
this._service_installer.DisplayName = "Online Backup Scheduler Service";
|
|
this._service_installer.Description = "Online Backup Scheduler Service";
|
|
this._service_installer.StartType = ServiceStartMode.Manual;
|
|
this._service_installer.ServiceName = "OnlineBackupSchedulerService";
|
|
this.Installers.Add((Installer) this._service_process_installer);
|
|
this.Installers.Add((Installer) this._service_installer);
|
|
}
|
|
}
|
|
}
|