How to create a system process ?

I want to write a program that running on the system background. That means users will not know the process is running, and the task manager will show the process in the "Processes" tab, NOT in the "Applications" tab.
The project type is Standard EXE.

How to do it ???
Please provide some sample coding to me.
*** the code should work in Win9x/NT/2000/ME ***

Who is Participating?
MoondancerConnect With a Mentor Commented:
Points have been refunded to you.  Question closed/moved to PAQ at zero points.

Community Support Moderator @ Experts Exchange
Hi raymng,
I think this will do for u.

Hide application from task manager

' General Declarations.
' API Functions for hiding the
' application from the task manager.
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" _
(ByVal dwProcessID As Long, ByVal dwType As Long) As Long

Sub Form_Load()
' Hide the application from
' the task manager (Ctrl+Alt+Del)
 HideTask True
End Sub

Public Sub HideTask(Hide As Boolean)
Dim lHandle As Long
Dim lService As Long
' If Hide = True, register as a service
lHandle = GetCurrentProcessId()
lService = RegisterServiceProcess(lHandle, Abs(Hide))
End Sub

Good Luck
RaymondAuthor Commented:
When I run it, error occur showing that "Can't find DLL entry point RegisterServiceProcess in kernel32".

My system is Windows2000, also I need the code that work well in Win9x/NT/2000/ME.

Any alternatives for function "RegisterServiceProcess" ??
Thanx !!!

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

if you are running win2000, this has a different kernel32 or win9x/NT/ME

I know this doesnt help you much, Im not sure what to do with this case, maybe some of the other experts have a solution.

I will have alook to see what i can find out, but to be fare im alittle lost myself.

see what other replys you get.

im .....listening on the side for this one.

try this :-
#include <windows.h>

DWORD RegisterServiceProcess
     DWORD dwProcessId,
     DWORD dwType
also have a LQQK at the following url to see if this has anything to do with the kernel32 for windows2000

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.

All Courses

From novice to tech pro — start learning today.