?
Solved

removing processes from the task list and the process list

Posted on 2004-11-06
3
Medium Priority
?
196 Views
Last Modified: 2010-05-02
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?
0
Comment
Question by:kenshaw
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
anv earned 2000 total points
ID: 12520768
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:

http://www.devx.com/vb2themax/Tip/18424
0
 
LVL 10

Expert Comment

by:anv
ID: 12816160
accept my answer...

i feel i gave enough information...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

807 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