Solved

How to create a system process ?

Posted on 2001-06-09
6
151 Views
Last Modified: 2010-05-02
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 ***


MW
0
Comment
Question by:raymng
6 Comments
 
LVL 3

Expert Comment

by:sridhar_PJ
ID: 6170554
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
Sridhar
0
 

Author Comment

by:raymng
ID: 6170683
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 !!!


Regards,
MW
0
 
LVL 2

Expert Comment

by:Microsoft
ID: 6171524
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.

cheers
Andi
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:Microsoft
ID: 6171532
try this :-
#include <windows.h>

DWORD RegisterServiceProcess
(
     DWORD dwProcessId,
     DWORD dwType
);
0
 
LVL 2

Expert Comment

by:Microsoft
ID: 6171536
also have a LQQK at the following url to see if this has anything to do with the kernel32 for windows2000

http://www.winehq.com/WineAPI/RegisterServiceProcess.html

cheers
andy
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 6678409
Points have been refunded to you.  Question closed/moved to PAQ at zero points.

Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now