LOL. Net administration is like cat-herding.
Here's a possibility for you: Starcraft won't run if the user doesn't have admin rights...
Just a thought.
Anyways, consider these two methods:
for file in file_list:
if file somewhere in file_system:
delete it.
vs.
for file in entire_file_system:
if file in file_list:
delete it.
From a theoretical point of view, both are equally time-consuming. But practically, the second one wins hands-down because you are only traversing the file system once, which requires a lot of hard-drive access time.
AND,
the second one is easier to code.
def main():
drives = ['c:/','d:/','e:/','f:/']
bad_guys = ["stardat.mpq", "starcraft.exe", "Local.dll",
"storm.dll", "Smack32.dll"]
for drive in drives:
for root, dirs, files in os.walk(drive):
for file in files:
if file in bad_guys:
print 'found %s in %s' % (file, root)
delete_file(os.path.join(root,file))
main()
I left out the counter and most of the logging, but that's the gist.