Author Topic: Help Please!!  (Read 18667 times)

Creadig

  • Posts: 71
Help Please!!
« on: 30 Jul '03 - 23:39 »
Nothing to do with BASS.DLL

Anybody knows how can i hide my app from the windows endtask list. Please HELP!!.

I am using VB 6 on Windows XP SP2.

bigjim

  • Posts: 232
Re: Help Please!!
« Reply #1 on: 31 Jul '03 - 03:11 »
Good luck m8 - very hard on the nt kernel :-[

Creadig

  • Posts: 71
Re: Help Please!!
« Reply #2 on: 31 Jul '03 - 03:41 »
I have been trying to use this code from Planet-source-code.com...

Code: [Select]

App.Title = ""  'this hides our program from the XP,NT,2k endtask list

'this remove our program from the windows 9x endtask list
Dim process As Long
process = GetCurrentProcessId()
Call RegisterServiceProcess(process, RSP_SIMPLE_SERVICE)

'set it to realtime priority so windows endtask won't allow closing it
Call SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS)


but this API: "RegisterServiceProcess" don`t work on my kernel32.

Please HELP!!!.

Zakhar

  • Guest
Re: Help Please!!
« Reply #3 on: 31 Jul '03 - 11:07 »
OK,this should work on most windows versions.it will hide your app from the tasklist when they press Alt+Ctrl+Delete.

'Declarations

Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Public Declare Function GetCurrentProcess Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0

'This sub does it

Public Sub RemoveProgramFromList()
   Dim lngProcessID As Long
   Dim lngReturn As Long
   lngProcessID = GetCurrentProcessId()
   lngReturn = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub

'To restore your application to the Ctrl+Alt+Delete list, call the UnMakeMeService procedure:

Public Sub AddProgramToList()
   Dim lngProcessID As Long
   Dim lngReturn As Long
   
   lngProcessID = GetCurrentProcessId()
   lngReturn = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
End Sub

Hope it helps. :-)

Zakhar

  • Guest
Re: Help Please!!
« Reply #4 on: 31 Jul '03 - 11:16 »
Holly s**t! i tested the code on the other machine in the office running XP,and it says the same error. it seems XP uses completely different kernel system.

i guess someone with NT coding skills could help u.  8)

Creadig

  • Posts: 71
Re: Help Please!!
« Reply #5 on: 1 Aug '03 - 02:00 »
Yeap!!.. that`s my problem!!..  :'(

Thak you anyway!  ;)

Anybody can help me?? IAN??

WingZero

  • Posts: 167
Re: Help Please!!
« Reply #6 on: 1 Aug '03 - 06:59 »
Is this where you got your source from?
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=764&lngWId=7

If not, then maybe you should read that. It says you have to check Windows versions, and gives some Delphi code to do that. And you can't statically link to RegisterProcessServer! You must use GetProcAddress. Otherwise your program will fail before it even loads on non-9x machines. And besides the little bit about changing App.Title to "", there's no sure way to hide processes from the NT/XP Task Manager. The only way would be to disguise the process name as something that a user would normally run.
« Last Edit: 1 Aug '03 - 07:06 by WingZero »

Torkell

  • Posts: 1169
Re: Help Please!!
« Reply #7 on: 1 Aug '03 - 11:53 »
Here's a thought to stop anyone closing your program: have two processes, each one registered as a debugger for the other. Now, only one process will actually be doing any work. The second will just be there doing nothing. Since they are registered as debuggers for each other, neither one can be closed by task manager as it is being debugged by the other.

Creadig

  • Posts: 71
Re: Help Please!!
« Reply #8 on: 1 Aug '03 - 13:55 »
WingZero, when i try this page:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=764&lngWId=7

I get this.
ERROR
The requested URL could not be retrieved.

I am dealing with to find some documentation on the APIS of WinNT. I believe that I can find a solution or a substitute for RegisterServiceProcess on NT Kernel32.

Sorry my very bad english..  :-/ .. i do my best.
Tank You WingZero and BoggyB

Creadig

  • Posts: 71
Re: Help Please!!
« Reply #9 on: 1 Aug '03 - 15:13 »
i find this: Complete Kernel32 API for VB.
http://rattlesnake.at.box.sk/newsread.php?newsid=183

I hope this help.  :-/

WingZero

  • Posts: 167
Re: Help Please!!
« Reply #10 on: 1 Aug '03 - 21:58 »
There is no replacement for RegisterProcessService on Windows NT. On Windows 9x, it was much, much easier to create a service. In Windows NT and XP, your application needs to be multithreaded to be able to become a service. Even then, the Task Manager is much, much better and will still show the name of your process. The only way to hide it is to disguise the name as some other common process.

Creadig

  • Posts: 71
Re: Help Please!!
« Reply #11 on: 2 Aug '03 - 01:05 »
Yeap..  :'( .. I am afraid that it is truth
I don`t know what to do.

Tankyou anyway.
;)

WingZero

  • Posts: 167
Re: Help Please!!
« Reply #12 on: 14 Aug '03 - 03:03 »
I just found this: http://spiff.tripnet.se/~iczelion/source.html

 The download is Invisibility. It's got a lot of ASM, though, so I don't know if you can use it. The Win 9x bit you had works properly, although you missed one other thing to fix. In Win 2k/XP, you have to install a System Driver in order to gain lower level access and hide your app.

Creadig

  • Posts: 71
Re: Help Please!!
« Reply #13 on: 14 Aug '03 - 18:34 »
Interesting!!..  :D

Tank you WingZero

Sheep

  • Posts: 243
Re: Help Please!!
« Reply #14 on: 18 Aug '03 - 09:32 »
I hate virusses.

Creadig

  • Posts: 71
Re: Help Please!!
« Reply #15 on: 18 Aug '03 - 22:13 »
Virusses??? ??? ... :o

VB_Guy

  • Posts: 17
Re: Help Please!!
« Reply #16 on: 19 Aug '03 - 06:29 »
There is no point to hiding your processes from the user. It's the equivalent of Microsoft building an operating system, but it never lets you turn it off.

VB Guy

Creadig

  • Posts: 71
Re: Help Please!!
« Reply #17 on: 19 Aug '03 - 23:03 »
Is for a CyberControl soft. block and unblock the pc. Hide de app from user to prevent CTRL+ALT+DEL unload. NO VIRUS.

When the pc is bloqued: CTRL+ALT+DEL is disabled.
When the pc is unbloqued: Hide from taskbar is needed.

NO VIRUS.!!

Sorry my english!.
;)

biggyspender

  • Posts: 28
Re: Help Please!!
« Reply #18 on: 20 Aug '03 - 09:53 »
What's wrong with the standard "Lock Computer"?

Luckie

  • Posts: 16
Re: Help Please!!
« Reply #19 on: 21 Aug '03 - 05:57 »
There is no way to hide your application from the taskmanager's processlist on Windows NT and higher.

The API RegisterServiceProcess does not exist on Windows NT and higher: RegisterServiceprocess

If you don't want you application to be terminated by a normal user, write a service. Services can only terminated by the admin or a user who has the rights to do this. And a service needn't be multithreaded. But be aware, services cannot have user interfaces i.e. windows. They can only interact with the currently logged on user via messageboxes with the flag: MB_SERVICE_NOTIFICATION.

By the way, I see no reason why your application should be invisibel for users. Use policies on NT machines for restricting the users rights. With policies you can even deactivate the taskmanger for special users. That is even the official way recommended by Microsoft.
« Last Edit: 21 Aug '03 - 05:58 by Luckie »

Creadig

  • Posts: 71
Re: Help Please!!
« Reply #20 on: 22 Aug '03 - 07:43 »
CyberControl (client side) can not be a service app for a couple of reasons,user interface is one of them.

In Win 98 "RegisterServiceProcess" is used for hide the app and prevent the force close, but in Win NT/XP/2000..???

i can do this in my cyber and in my personal computer:
Code: [Select]

Use policies on NT machines for restricting the users rights. With policies you can even deactivate the taskmanger for special users.

but.. there is no a solution for others cybers if i want to shell my soft.

I hope that you understand to me
Sory my bad english.

;)