• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

Not allow the process of my program is finalized by mananger process of windows.

if a malware or the user try to finalize my programa by process i want to not allow this operation.
any solution ?
0
davizinx
Asked:
davizinx
  • 3
  • 3
  • 3
1 Solution
 
Geert GruwezOracle dbaCommented:
what do you mean with finalize ?
0
 
davizinxAuthor Commented:
i want know about if an virus type this command: "taskkill -f /im myprogram.exe"

if somebody try to close my program by process its not allow.
0
 
Geert GruwezOracle dbaCommented:
run the program with the system account using runas
or automatically restart the program using some other program

or rename the taskkill program

what about if the user wants to restart the pc ?



0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
davizinxAuthor Commented:
No!
 You know when we try to finish the winlogon.exe and manager displays a message denying the operation?
 then I want to do the same with my program, do not let it be done by the Task Manager as well as many anti virus use the same technique! (avast, nod32, Avira etc. ..)
0
 
swiatloCommented:
if this program has a window you could catch and interpret windows messgeses passed to it: WM_CLOSE, WM_QUIT etc, but this is just an idea.

http://tds.diamondcs.com.au/advancedseries/processkilltechniques.php
0
 
swiatloCommented:
One of a techniques:
A  hook is a mechanism that allows for the interception (and even behaviour modification) of a function or section of code. For example, a trojan might hook the TerminateProcess function so that whenever that function is called the trojan can examine which process is being terminated and thus prevent itself from being terminated.
0
 
davizinxAuthor Commented:
It is really a good idea, also would welcome an example of code in practice.
0
 
swiatloCommented:
I dont have an example, sorry. I canot write one. You must google the topic youself.
You may find a few hooks egzamples for keybord key press This should be very similar aproach. I didn;t find any terminate process  - but I did not look a lot.
0
 
Geert GruwezOracle dbaCommented:
if somebody leads you in a direction to a solution that is help too...
no wonder nobody helps you, if you don't accept their help

please read the EE guidelines
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now