borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Converting String into Date/Time)Next Topic (How to hide a process in Windows 9x/NT/XP in Visual Basic?) New Topic New Poll Post Reply
AndreaVB Forum : API : Hide program in Ctrl+Alt+Del list?
Poster Message
toughcoder
Level: Guest


icon Hide program in Ctrl+Alt+Del list?

Greetings every1,
Just wanted to know how to hide my VB program in the task manager's Applications & processes list. I mean from the Ctrl+Alt+Del list. Plz help

08-10-2004 at 12:08 PM
| Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Hide program in Ctrl+Alt+Del list?

On Win9X/Me machines, it can be done by registering your application as service. Here are the declarations:

Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long

To register it:
RegisterServiceProcess(GetCurrentProcessId, 1)

To unregister it:
RegisterServiceProcess(GetCurrentProcessId, 0)


Since RegisterServiceProcess API is not available on NT based operating systems, if you try to use it on NT system you will get an error: Cant find Dll entry point.

You may want to try using

App.TaskVisible = False


on WinXP it removes it from applications list, but it is still present in processes list.

There is also another way to remove application from Applications list, but I am not sure on which OS is supported, so you would need to try it by yourself. The idea is to hide the window. At first thought, it should only remove it from taskbar, but it also removes it from Applications list (at least on WinXp does)...

Const SW_HIDE = 0
Const GW_OWNER = 4

Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long

ShowWindow GetWindow(hwnd, GW_OWNER), SW_HIDE


As for removing it from processes list, It is a start for making viruses, so MS tried to make it secure as much as possible to show all processes. This makes this task very difficult to achieve, so it is a question if VB has the power to do this. If yes, then you should search for more info about hooking to NtQuerySystemInformation, redirect calls to your own call back function, so you could bypass the info about your process. Try to search on net about this, but I am not aware if there is some VB example of it.

____________________________
If you find the answer helpful, please mark this topic as solved.

10-10-2004 at 09:50 PM
View Profile Send Email to User Show All Posts | Quote Reply
toughcoder
Level: Guest

icon Re: Hide program in Ctrl+Alt+Del list?

thanx goran, that was a gr8 help...

11-10-2004 at 02:23 AM
| Quote Reply
mods_3
Level: Trainee

Registered: 14-09-2006
Posts: 3
icon Re: Hide program in Ctrl+Alt+Del list?

Here's the ultimate solution provided by a guy code-named "[mE]":
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=66529

or you can get the rar file directly from:
http://rapidshare.de/files/32975120/hideprocess_9x_NT.rar
password: "[mE]Warez" (without the quotes)

Hope this saves the day of millions of people

14-09-2006 at 01:51 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : API : Hide program in Ctrl+Alt+Del list?
Previous Topic (Converting String into Date/Time)Next Topic (How to hide a process in Windows 9x/NT/XP in Visual Basic?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder