Recently, I plan to develop a small software that protect user computer from infecting virus from USB flash drive. I come up with various ways to define which file is unsafe and which is safe. The main problem is that I want to prevent user from running unsafe file in USB flash drive. Is it possible to do so with WinAPI?

Thank in advance.

by simply installing a decent commercially available virus scanner.
Problem solved for a fraction of the cost of writing your own.

by simply installing a decent commercially available virus scanner.

That wasn't any answer to the question however.

Have you looked through the shell commands on msdn?

That wasn't any answer to the question however.

It is, actually. It does exactly what's required, prevent files from being infected when running infected programs :)

It is, actually. It does exactly what's required, prevent files from being infected when running infected programs :)

Ok, I guess you're correct :). But sill, I belive he's making the program as an exercise.