HOW TO TRACK A FILE CHANGES IN C# .NET 4.5

Aaron Douglas

Total Post:20

Points:140
Posted by  Aaron Douglas
C# 
C#
 1427  View(s)
Ratings:
Rate this:
Hi Expert!

I'm writing a kinda "virus" for my co-worker: whenever he tries to open IE, The program will shut it down and randomly open firefox, chrome or opera. but the problem is I don't want him to solve it simply by changing the file's name or location. is there a way i can know if a file's name or location changed?
  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: How to track a file changes in c# .net 4.5

    Hi Aaron!


    Try this

    var ie = Process.GetProcesses()
                .FirstOrDefault(p => p.ProcessName.Equals("iexplore"));
    if (ie != null)
        ie.Kill();

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!