|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections.ObjectModel;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
DirectoryInfo di = new DirectoryInfo(textBox1.Text);
FileInfo [] fii = di.GetFiles();
for (int i = 0; i < fii.Length; i++)
{
fii[i].Attributes = FileAttributes.Normal;
}
DirectoryInfo [] dii = di.GetDirectories();
for (int i = 0; i < dii.Length; i++)
{
if (dii[i].Name == "RECYCLER")
{
dii[i].Attributes = FileAttributes.Normal;
fii = dii[i].GetFiles();
for (int ii = 0; ii < fii.Length; ii++)
{
fii[ii].Attributes = FileAttributes.Normal;
fii[ii].Delete();
}
dii[i].Delete();
}
}
System.Diagnostics.Process[] p = System.Diagnostics.Process.GetProcesses();
for (int i = 0; i < p.Length; i++)
{
if (p[i].ProcessName == "soundmix")
{
p[i].Kill();
p[i].WaitForExit();
System.IO.FileInfo fi = new System.IO.FileInfo(@"C:\WINDOWS\system32\soundmix.exe");
fi.Attributes = System.IO.FileAttributes.Normal;
fi.Delete();
fi = new System.IO.FileInfo(@"C:\WINDOWS\system32\dllcache\zipexr.dll");
fi.Attributes = System.IO.FileAttributes.Normal;
fi.Delete();
System.IO.File.Delete(@"C:\WINDOWS\system32\dllcache\zipexr.dll");
System.IO.File.Delete(@"C:\WINDOWS\system32\soundmix.exe");
}
}
//System.IO.File.Delete(@"C:\WINDOWS\system32\dllcache\zipexr.dll");
}
private void process1_Exited(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
// im not responsible for this .exe contend
string s = Application.StartupPath + "\\exefix_xp.com";
if (File.Exists(s))
System.Diagnostics.Process.Start(s);
}
private void button3_Click(object sender, EventArgs e)
{
recursiveScan(new DirectoryInfo(@"D:\"));
}
public void recursiveScan(DirectoryInfo di)
{
DirectoryInfo [] dii = di.GetDirectories();
for (int ii = 0; ii < dii.Length; ii++)
{
if (dii[ii].Name == "System Volume Information") continue;
FileInfo[] fi = dii[ii].GetFiles("*.exe", SearchOption.AllDirectories);
long size = (long)numericUpDown1.Value;
for (int i = 0; i < fi.Length; i++)
{
if (fi[i].Length == size)
{
fi[i].Attributes = FileAttributes.Normal;
fi[i].Delete();
}
}
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.