Question Getting file name before execution

Grayda

Member
Joined
May 20, 2010
Messages
16
Programming Experience
10+
Right now a project I'm working on is in the planning stage, but I'd like to know the best way of going about this:

This project's end goal is to behave like Group Policy's Software Restriction Policy, whereby an administrator can block execution of a file or file within a path / registry key.

What I'd like to discuss is, can you read the filename of a file before it's executed (like an on-demand virus scanner does)? For example:

Mallory has a file on her USB drive called "hello.txt" which contains top-secret stuff. She double clicks on it.

My application works out that Mallory is trying to launch "hello.txt" (not Notepad.exe -- there's the difference) and "returns false", in other words, blocking the file.

I might have managed this in VB6 (lawl) using some clever subclassing techniques, but I wonder if VB.NET has a better way to go about it. Google searches bring up nothing, nor does a skim over the VB.NET documentation.
 
Top Bottom