Advertise with us

How to track a file changes in c# .net 4.5

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?
Last updated:7/8/2013 8:27:12 AM

1 Answers

AVADHESH PATEL
AVADHESH PATEL

Hi Aaron!


Try this

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

Last updated:7/8/2013 8:27:12 AM

Answer