Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static bool smethod_2(string string_0)
- {
- if (File.Exists(string_0))
- {
- try
- {
- Process[] processesByName = Process.GetProcessesByName("puush.daemon.exe");
- for (int i = 0; i < processesByName.Length; i++)
- {
- Process process = processesByName[i];
- process.Kill();
- }
- Process[] processesByName2 = Process.GetProcessesByName("puush.daemon");
- for (int j = 0; j < processesByName2.Length; j++)
- {
- Process process2 = processesByName2[j];
- process2.Kill();
- }
- }
- catch
- {
- }
- int num = 20;
- bool flag = false;
- while (num-- > 0)
- {
- try
- {
- File.Delete(string_0);
- flag = true;
- break;
- }
- catch
- {
- }
- Thread.Sleep(200);
- }
- if (!flag)
- {
- try
- {
- File.Move(string_0, string_0 + "_delete");
- }
- catch
- {
- }
- }
- try
- {
- using (RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", true))
- {
- registryKey.DeleteValue("puush daemon", true);
- }
- }
- catch (Exception)
- {
- }
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement