I'm using:
RegisterServiceProcess(GetCurrentProcessID, RSPSIMPLESERVICE);
But only works on Win9x
Are there any other way to do it on Win XP/Vista ?
Thanks in advance !
Carlo, That makes me want to put your name on my
"untrusted" list; and what is the name of the program?
Yours, JohnH
Run your program as a service, under an administrator account. Have you
users use a limited account that doesn't have permissions to alter the
service.
Cheers,
Nicholas Sherlock
That is a better solution, unless there are hidden problems.
--JohnH
function
RegisterServiceProcess;
external
'KERNEL32.DLL'
name
'RegisterServiceProcess';
RegisterServiceProcess(0,1);
//
to
hide
RegisterServiceProcess(0,0);
//
to
show
Not
available
at
NT/2K/XP!
---
SystemParametersInfo(SPI_SCREENSAVERRUNNING,1,Nil,0);
//
disable
task
manager
SystemParametersInfo(SPI_SCREENSAVERRUNNING,0,Nil,0);
//
enable
task
manager
Perhaps
not
working
at
NT/2K/XP!
Try
it.
cu.
> Hi, i'm tring to hide my program from windows task manager
You can't hide it (unless you are writing a virus/rootkit, in which case be
prepared to be severely shuned by your users).
> preventing any user can stop it.
To simply stop users from exiting the program in the "Applications" section
of TM, then simply set the CanClose parameter of the MainForm's OnCloseQuery
event to False, or the Action parameter of the OnClose event to caNone.
If, on the other hand, users are using the "Processes" section of TM
instead, then the only way for an application to survive that kind of
termination is if the process is running in an elevated security context
that the user does not have access rights to. Which should always be the
case if you configured your user accounts properly to begin with. If you
run the program in an adminstrative account, only admins will have access to
kill it.
> Are there any other way to do it on Win XP/Vista ?
Create an actual service project (File | New | Service Application).
Gambit