DelphiFAQ Home Search:

Hide your application in Windows' task manager

 

comments15 comments. Current rating: 4 stars (3 votes). Leave comments and/ or rate it.

There are various ways to attempt hiding an application in the task manager. A simple trick is to set the application title to be empty thus have Windows display an empty entry there (the entry is still in the task manager's list of applications but empty).

Another attempt is to register the process while running as a service. The general purpose of running as a service is to allow your program to run without needing to have a user logged on. Common usages are most virus scanners, firewalls or some FTP servers. Services can also have a user interface; they don't need to be 'invisible'.

In consumer versions of Windows (95,98,ME) the kernel exports a function RegisterServiceProcess which easily registers an regular application into an service and back. All you need is the process ID.

Delphi doesn't import this function - probably because it is not supported in newer Windows versions. To be able to run on Windows NT, 2000 or XP, you should check at runtime the version of Windows and then dynamically load that DLL (with LoadLibrary()) and import the function RegisterServiceProcess.

The code below shows a static link to KERNEL32.DLL and it will not start up on Windows 2000. The links above show how to check the Windows version and how to dynamically load DLLs and import functions.

// Works only on Windows 95,98 and ME.
// The kernels of Windows NT/2000/XP do not export this function
function RegisterServiceProcess(dwProcessID, dwType: DWORD): DWORD;
  stdcall; external 'KERNEL32.DLL';

begin
  // hide by registering as a service
  RegisterServiceProcess(GetCurrentProcessID, 1);

  // show again
  RegisterServiceProcess(GetCurrentProcessID, 0);
end

You don't like the formatting? Check out SourceCoder then!

Comments:

2006-03-23, 17:23:51
anonymous from United States  
can someone plz tell me how to set the application title to be empty...like can you change the titles of applications and set them to empty or something else...if so how?
2006-05-23, 06:38:58
anonymous from Finland  
Application.Initialize;
Application.Title := ' ';
Application.CreateForm(TForm1, Form1);

The best place to clear the Title property is inside the Project's source code. To see the Project source select Project|View Source in the IDE
2006-09-21, 12:26:13
anonymous from Latvia  
rating
Well, if you want to know how to hide your app in 2000 & XP too, you should check out this summary : http://w-shadow.com..skmanager/
2006-10-03, 03:25:08
anonymous from Vietnam  
Application.Title := ' ';
it can hide in 'application' tab but not in tab 'process' in task manager
2006-11-01, 12:45:52
anonymous from Cuba  
if you want to hide your program in applications tab use

ShowWindow(Application.Handle,SW_HIDE);

paste it in the OnActivate event of the main form.
This will hide the progrom from the task bar and the application
tab
2007-01-05, 16:16:15
anonymous from Latvia  
vorks 100 %
2007-04-17, 02:06:00
anonymous  
rating
Works 1000%
Great!!!!
2007-04-23, 22:51:12
anonymous from Indonesia  
very good, this site very usefull


Keywords:
2007-07-26, 22:29:36
anonymous from Indonesia  
rating
Great!!!
2007-08-21, 05:27:20
anonymous from Poland  
LOL
2008-02-25, 00:34:44
anonymous from India  
can any one tell me how to run applications without showing in task manager?
2008-03-05, 04:51:05
anonymous  
hey guys you can use just one command :D


application.showmainform:=false;

just this :D:D:D:D

put this command in OnCreate of Form1 :D

easy ;)
2008-04-21, 13:10:20
anonymous  
Hi i need some help. Using VB6 i have managed to 'run' an external exe from my program. Is it possible to hide the external exe from the applications tab in task manager? I know you can't hide the process on anything higher than 9x but thats fine - i don't want to do that anyway. I just don't want the external exe to be listed in applications.

I have tried Shell('<name of exe>.exe', vbHide) but it also hides the visual application. So the exe becomes useless.

Is there a better code? :)
2008-09-25, 02:41:10
anonymous from Sweden  
Hi. I have been creating a data stealing softwre and found a problem, when tried to use it.
First of all I need the software to be completely invisible and work with other processes (what I mean is that, when PC starts, lots of processes are initiated - what I want to do is to manipulate one of these processes with my software so it would work without a possibility to be detected).

Also please note that I have direct access to the machine, where I am going to set the software.

P.S.: this topic might be about illeagal actions, but I am sure that some1 knows the answers. If so - please let me know - modestas3D@gmail.com.
2008-11-24, 23:33:41   (updated: 2008-11-24, 23:36:39)
anonymous from India  
To hide the VB Application from TaskManager,

Try with this following code in your MDI form load evernt.

App.TaskVisible = False

Regards,
Vimala

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: