Solved

How to create a system process ?

Posted on 2001-06-09
6
152 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:Raymond
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:Raymond
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

770 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