Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pure Invisible & Hidden application

Posted on 2000-04-29
9
Medium Priority
?
284 Views
Last Modified: 2013-11-20
Is there a way to hide an application completely in Windows 95 and above?
I mean, hidden from taskbar, taskmon, the screen AND PROGRAM MANAGER!!

This is a tough one!
0
Comment
Question by:Aphroditus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 1

Expert Comment

by:Rheingold
ID: 2762607
Hi

yes, there are ways to do that. Here is the Delphi source to hide your app from the task manager. Yeah, I know we're in MFC area here, but I just have this example and at least you know which API to use. I don't know if it works on Win2K or WinNT though.

Procedure StealthMode;
Var hNdl:hwnd;
    RegisterServiceProcess: TRegisterServiceProcess;
begin
        hNdl:=LoadLibrary('KERNEL32.DLL');                               // Load Library!!
        RegisterServiceProcess:=GetProcAddress(hNdl, 'RegisterServiceProcess'); // Find loc.
             RegisterServiceProcess (GetCurrentProcessID, 1);  // Into stealth mode
        FreeLibrary(hNdl);                                // Good programming practice
end;

Regards
0
 

Author Comment

by:Aphroditus
ID: 2762828
I don't understand this bit of code at all since its all Pascal...

Could you explain with C++ Windows API instead?
0
 

Author Comment

by:Aphroditus
ID: 2762843
I don't understand this bit of code at all since its all Pascal...

Could you explain with C++ Windows API instead?
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 2

Expert Comment

by:poohbear_68
ID: 2762952
Try this code.  It's translated from Rheingold's code.

   typedef UINT (CALLBACK* LPREGISTERSERVICEPROC)(DWORD,DWORD);

   HINSTANCE hDLL = LoadLibrary("KERNEL32.DLL");
   if(hDLL)
   {
      LPREGISTERSERVICEPROC lpRegisterServiceProc =
         (LPREGISTERSERVICEPROC)GetProcAddress(hDLL, "RegisterServiceProcess");

      if(!lpRegisterServiceProp)
      {
         // handle the error
      }
      else
      {
         // call the function
         DWORD dwRet = lpRegisterServiceProc(GetCurrentProcessId(), 1);
      }
     
      FreeLibrary(hDLL);      
   }
0
 
LVL 11

Expert Comment

by:mikeblas
ID: 2764141
Note that RegisterServiceProcess is an undocumented API--remember to heed all the caveats that go with using undocumented features. A lso, remember that the effect of the API is to allow an app to continue to run even after the user has logged off.

You can find a sample which hides an app using documented APIs by checking out the STEALTH.ZIP sample at http://www.nwlink.com/~mikeblas/samples/ . (Note that my website will someday move to http://www.mooseboy.com/ )

..B ekiM
0
 
LVL 2

Accepted Solution

by:
JunHaan earned 568 total points
ID: 2777542
To actually hide your application from the windows Task Manager is simple, you'd just need to unregister your application's process service...
Here's some code you could follow :

first, declare some global variables and our function prototype :
void __fastcall reg(bool which); //function prototype

//Globals
typedef DWORD (WINAPI *TRegisterServiceProcess)(DWORD,DWORD);
bool registered=false;

then, insert this code anywhere in your app:
void __fastcall reg(bool which)
{
     HMODULE hmod;
     TRegisterServiceProcess pReg;
     hmod = LoadLibrary("kernel32.dll"); //Load kernel32.dll

     if (!hmod) return; //return if unable to load kernel32.dll
     (TRegisterServiceProcess) pReg = (TRegisterServiceProcess)::GetProcAddress(hmod,"RegisterServiceProcess"); //Get the process address to RegisterServiceProcess
     if (!pReg) {FreeLibrary(hmod); return;}
     else
     {
       if (which) pReg(0,1); //unregister our process  
       else pReg(0,0);
     }
     registered = true;
     FreeLibrary(hmod);
   }

then override your application's initialization routine and add :

reg(true);

This will partially hide your application from the task manager. Your application will still be visible if a process viewer is used(like the one included with Microsoft Visual Studio 6.0) and that's another story...

Hope this helps.
0
 

Author Comment

by:Aphroditus
ID: 2777567
thanks man!
0
 

Author Comment

by:Aphroditus
ID: 2777586
thanks man!
0
 

Expert Comment

by:rvr2k1
ID: 9106738
how about hiding the application from the task manager for window nt/xp?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question