-
July 4th, 2008, 05:47 PM
#1
Detect application execution
Hi, I don't think this is possible, but is there a way to prevent executables from running until the user allows them to run? When an executable is launched, it's intercepted and a msgbox/form pops up and asks the user if it really should run.
Like a firewall does with the internet. As soon as an application tries to connect to the internet, the firewall blocks the connection and asks the user if it's ok to let the application access the internet.
I know you can set group policies in Windows to stop certain executables from running, but I'm wondering if can be done with VB6.
-
July 5th, 2008, 01:31 AM
#2
Re: Detect application execution
-
July 5th, 2008, 09:44 AM
#3
Re: Detect application execution
Thank you Shaikh.Riyaz.a, but that code is missing declarations and some other necessary code.
It seems I need to look for HSHELL_WINDOWCREATED.
With a google search I found this and it works fine.
http://www.diybl.com/course/3_progra...31/107858.html
-
July 5th, 2008, 10:17 AM
#4
Re: Detect application execution
i don't recommend this, as it's easy to lock yourself out as well
-
July 5th, 2008, 12:07 PM
#5
Re: Detect application execution
I know I have to be careful with it. As a test I'm only checking a single excutable, but it doesn't seem to be fast enough. When I use the SuspendThread API, it's fast enough to make sure the Form_Load event of the test application doesn't fire, but the Form_Initialize event still does.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|