Search for and Delete .exe and containing folder
Posted on 2012-12-29
Is it possible to run a script (preferably in batch file but whatever will work) to search for a particular .EXE and if found to delete it and then, if possible to discover which folder it is in and delete that folder too? I run a Windows domain and as users get more and more sophisticated they are finding ways to install programs that management has told them not to install (programs like iTunes, Safari browser). Initially it was easy to control because most users used the default install locations but as they noticed it was been removed (via a logon script) they have started installing it in non-default locations and we found one users who choose to install it on his external drive and this is the type of behavior I am trying to stop by finding a known exe and then deleting it and its containing folder? Possible?