Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using Microsoft.Win32;
- using Microsoft.VisualBasic;
- namespace ConsoleApplication
- {
- class Program
- {
- static void Main(string[] args)
- {
- for( ; ; )
- {
- using (var key = Registry.ClassesRoot.OpenSubKey(@"samp\shell\open\command\"))
- {
- string value = (string)key.GetValue(null);
- value = value.Remove(0,1);
- value = value.Remove(value.Length-14);
- key.Close();
- string[] detect_files = { "CLEO.asi", "mod_sa.ini", "d3d9.dll" };
- string[] detect_dir = { "CLEO" };
- for (int i = 0; i != detect_files.Length; i++)
- {
- if (File.Exists(value+detect_files[i]))
- {
- File.Delete(value + detect_files[i]);
- Console.WriteLine("File " + detect_files[i] + " in " + value + detect_files[i] + " deleted");
- }
- }
- for (int i = 0; i != detect_dir.Length; i++)
- {
- if (Directory.Exists(value + detect_dir[i]))
- {
- Directory.Delete(value + detect_dir[i], true);
- Console.WriteLine("Folder " + detect_dir[i] + " in " + value + detect_dir[i] + " is deleted");
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement