removing processes from the task list and the process list

In VB - is there a way to make it so that new executables don't show up in the task list or the processes list?

i.e. I want to build an ActiveX EXE to do some asynchronous method calls from my main exe - but I don't want the new ActiveX EXE to show up when a user goes control alt del and looks at either teh "applicaitons" tab or the "processes" tab.  How would I achieve this?
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.

hi kenshaw

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.

you can also try this link:

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
accept my answer...

i feel i gave enough information...
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
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.