using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Text; using System.Windows.Forms; using System.IO; namespace IS_Application { public partial class frmMain : Form { public frmMain() { InitializeComponent(); } private void btnRemove_Click(object sender, EventArgs e) { try { string user = textBox1.Text; DirectoryInfo username = new DirectoryInfo("C:\\Documents and Settings\\" + user); if (Directory.Exists(@"C:\Documents and Settings\" + user)) File.Delete("C:\\Documents and Settings\\" + user + "\\Local Settings\\Temp\\"); File.Delete("C:\\Documents and Settings\\" + user + "\\Local Settings\\Temp\\Temporary Internet Files\\"); File.Delete("C:\\Documents and Settings\\" + user + "\\Application Data\\"); //Directory.Delete("C:\\Documents and Settings\\" + user + "\\Local Settings\\Temp\\"); //Directory.Delete("C:\\Documents and Settings\\" + user + "\\Local Settings\\Temp\\Temporary Internet Files\\"); } catch (Exception) { throw; } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)