Link to home
Start Free TrialLog in
Avatar of AngeloX
AngeloX

asked on

Prevent program from being executed.

Hey guys n gals,

How do I prevent a program from being executed.
I want to for example disable notepad.exe from being ran.
BTW, I only have the FileName of the program, so no WindowName.
Any ideas?

Thnx!
ASKER CERTIFIED SOLUTION
Avatar of esoftbg
esoftbg
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AngeloX
AngeloX

ASKER

Hey thnx but the solution there isnt really what I wanted. No code that will edit the exe file with a password dialog and all that stuff.

I simply want a code that will stop a program from running if the filename is for example notepad.exe. That's all.

Thnx!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hey  AngeloX,
didn't you see the solution offered by Gwena and graded as an accepted answer:
http://www.geocities.com/gacarpenter386/pw-demo.zip
Avatar of AngeloX

ASKER

Hypoviax,

thnx but I already though of that too. Too much memory needed for a timer. Its not the right way to do.

Esoftbg,

that program will add binary to the exe and return the normal exe once everything is done. I dont want that.

For now the only way i guess is to let the program run the other exe in memory so the exe will be locked from running. But also that is not really the right way.

Anyone else any ideas?

Thnx!
O.k. Good luck !  I hope someone will provide the code what you need !
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
madshi's packages cost USD150 (including source) but you may have the trial version to use (no source code) for personal and non-commercial use.

(Gee, i feel like i'm doing advertising for madshi, lol)
I read a book that has a registry hack to prevente any program from being executed. I cannot recall the exact procedure and did not buy the book, but it involves adding a registry Key, then using thet key to open all executables. Then writing another key to prevent execution of any program in the list. The list would be something like the MRU lists in the registry. So you can add or remove from it with a reg file.
 I remember it beeing about "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer...." thats all I can recall from the registry address. Then you had to add the key called someyhing like "PreventExecution" and the rest I really don't recall.