View more

View more

View more

Image of the Day Submit

IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

How to make my app unremovable from taskmanager in Win2k/NT

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

36 replies to this topic

#1T2k  Members

Posted 27 May 2002 - 09:10 PM

i have an app that starts doing stuff by logoff at win2k/nt systems, and i want to secure my app, so the user cannot end the process etc... ive already searched the web, but all ive found was a solution for win98/95... and i dont want it to be a service (it wouldnt be able to interact with the user, and would not recognice the logoff message) thanks for any help... T2k

#2IndirectX  Members

Posted 27 May 2002 - 09:30 PM

Why are you so opposed to people killing your app? Are you doing something the user isn''t supposed to know about? One of the very annoying things are installation programs (for Symantec software, for example) that in the end present you with the messagebox that asks you to reboot your computer and have only one button: "OK". Task manager is a useful tool in case you want to kill software that is written by developers who think their way is the only correct one.

In case you don''t know: even though taskman can''t kill certain processes, it doesn''t mean that they are "unkillable". It takes only a couple more lines of code to kill any running process (provided you have necessary privileges, of course!). So I doubt that general solution exists that can prevent your program from getting killed. I suppoer you, however, can write a task manager extension that will detect your program and prevent the user from killing it, but this will work only for the taskman.

#3T2k  Members

Posted 27 May 2002 - 09:40 PM

maybe iam a bit unclear: my app is in no way destructive!!!, and i dont want to disable the taskmanager! So i have to secure my app, for MY COMPUTER, from other people killing it (iam not interessted to prevent coded apps doing it)

T2k

#4siaspete  Members

Posted 27 May 2002 - 10:00 PM

Heh, if someone wrote an app that wouldn''t shut down I think I''d personally hunt them down and get medieval on their ass.

How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions

#5Dean Harding  Members

Posted 28 May 2002 - 12:23 AM

By the way, I agree with the other two posters, you shouldn''t make it impossible to kill your app...

However, I don''t think anyone''s going to convince you, so here''s one way: You could have two copies of your program running, one which does basically nothing and the other which does the actual work. If one of them is killed, the other can detect that and re-start it (just have a thread waiting on a handle to the other process).

You could still get around it by killing both simultaneously, however you can''t kill two processes simultaneously from the task manager.

codeka.com - Just click it.

#6JonStelly  Members

Posted 28 May 2002 - 02:15 AM

Make your app a service. You can''t stop a service from the task manager, but you can go to the services plugin and stop it there.

#7Arild Fines  Members

Posted 28 May 2002 - 03:58 AM

kill.exe(from the resource kit)or taskkill.exe(supplied with XP) should be able to kill it no matter what you do.

#8DrPizza  Members

Posted 28 May 2002 - 05:20 AM

quote:
Original post by Arild Fines
kill.exe(from the resource kit)or taskkill.exe(supplied with XP) should be able to kill it no matter what you do.

Provided the process is running under your user context, or, if it''s not, you have the Debug Any Process privilege, that is correct.

#9SwSh  Members

Posted 28 May 2002 - 05:42 AM

I have the impression that Windows sometimes has the characteristics of "not wanting to be turned off".
Unfortunately Mic*oft doesn''t publish any source code. :D
(btw. this is not a Windows-offensive-post)

===========================
UNKNOWN caused an invalid page fault in module unknown at 0000:bff80eb6
: win98 with multiple sclerose

Posted 28 May 2002 - 07:35 AM

You will always be able to stop a process. However here''s a little hack.

2 processes monitoring each other. If one exits, the other one launches it again. Get it?

The user will be able to stop your process but it will get created again faster then the user could stop the other process.

#11DrPizza  Members

Posted 28 May 2002 - 07:42 AM

quote:
You will always be able to stop a process. However here''s a little hack.

2 processes monitoring each other. If one exits, the other one launches it again. Get it?

The user will be able to stop your process but it will get created again faster then the user could stop the other process.

So I just suspend one process and kill them in turn.

#12Dean Harding  Members

Posted 28 May 2002 - 11:23 AM

quote:
Original post by DrPizza
So I just suspend one process and kill them in turn.

Like I said in my post, it''s still possible to kill it, but not for the average user...

Still, I think it''s a bad idea to make a progam "unkillable", since you''re taking too much control away from the end-user. If they don''t want your program running, who are you to say they''re wrong?

codeka.com - Just click it.

#13jwalker  Members

Posted 28 May 2002 - 02:34 PM

check for WM_QUIT and WM_DESTROY.

then CreateProcess and run your program again.

windows will kill the last instance but not the new one.

Its my duty, to please that booty ! - John Shaft

#14amemorex  Members

Posted 28 May 2002 - 03:11 PM

Why can I not close down the process of Fortres running at my school then? What are they doing special?

#15a person  Members

Posted 28 May 2002 - 04:13 PM

why would the app need to be unkillable? password protection of some sort?

anywho, make it fullscreen, always on top, and disable ctrl-alt-del/alt-tab via telling windows a screen saver is active. works for ALL windows systems. only way to kill the app is through a hard reboot or through the app itself.

#16DrPizza  Members

Posted 28 May 2002 - 04:48 PM

quote:
Original post by a person
anywho, make it fullscreen, always on top, and disable ctrl-alt-del/alt-tab via telling windows a screen saver is active. works for ALL windows systems.

Except for NT ones, where you can''t disable ctrl-alt-del.

#17JonStelly  Members

Posted 28 May 2002 - 06:48 PM

Oh, I must have been mistaken. I thought this was a programming forum, not a ''how can I bypass my school''s security software'' forum.

#18T2k  Members

Posted 28 May 2002 - 08:49 PM

quote:
why would the app need to be unkillable? password protection of some sort?

because it has to check if files are in a specified folder, if yes, let the user move them to other places, else quit, that works already, but at the moment the user can also kill the process (... maybe by mistake) and then the folder get filled up with files, and nobody would now if they are needed or not ...

quote:
check for WM_QUIT and WM_DESTROY.

then CreateProcess and run your program again.

windows will kill the last instance but not the new one.

yes, but what if you kill a process-tree ?

quote:
Still, I think it's a bad idea to make a progam "unkillable", since you're taking too much control away from the end-user. If they don't want your program running, who are you to say they're wrong?

iam the person who owns the computer on which the programm runs :D

to the others who dont read carefully:
and ive already said that i cannot use a service, because it dont notifies the WM_QUERYENDSESSION Message (processes run till shutdown, i need it at the logoff point) and i cannot interact with the user via dialogs etc. (ive already tried it out with CodeGurus NT'Service Wizard)

T2k

[edited by - T2k on May 29, 2002 3:53:49 AM]

#19siaspete  Members

Posted 29 May 2002 - 12:58 AM

Maybe you should just tell us what your app actually does, so then people don''t think you''re doing something evil.

The only reason I can think for anyone wanting to do this, is if they wanted to write a program to steal other people''s passwords. I''m not too keen to help anyone do this.

Heck, I even had someone asking me to help him write a cheat for Counter-Strike. As if we don''t have enough jerks on the internet already.

How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions

#20T2k  Members

Posted 29 May 2002 - 01:05 AM

quote:

because it has to check if files are in a specified folder, if yes, let the user move them to other places, else quit, that works already, but at the moment the user can also kill the process (... maybe by mistake) and then the folder get filled up with files, and nobody would now if they are needed or not ...

i really dont know why some people simple dont read previous posts !