Results 1 to 4 of 4

Thread: Removing program from Task Manager

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    11
    Hi,

    I have a simple VB app written in VB6. I have this compiled to an exe. When I run it, it appears in the Task Manager. Is there any way of stopping it from appearing here, so that it is hidden to any users who run this exe?

    Thanks for any help,

    Russ

  2. #2
    Guest
    Try this:

    Code:
    Private Declare Function GetCurrentProcessId _
    Lib "kernel32" () As Long
    Private Declare Function RegisterServiceProcess _
    Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As _
    Long) As Long
    
    Private Const RSP_SIMPLE_SERVICE = 1
    
    
    Public Sub MakeMeService()
    
    Dim pid As Long
    Dim regserv As Long
    
    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
    
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    11
    Thanks for your help Matthew. Unfortunately the code doesn't work. I suspect it's because I'm running on Windows 2000, and the function can't see GetCurrentProcessID in Kernel32. I've had a look in the API Viewer on my system, and I can't see anything similar. Do you have any other suggestions?

    If not, thanks for your help anyway.

    Russ

  4. #4
    Addicted Member S@NSIS's Avatar
    Join Date
    Aug 2000
    Location
    Stoke-On-Trent, England
    Posts
    243
    Hi,
    Try this:
    Code:
    App.TaskVisible = False
    Hope this helps

    Shaun
    Web/Application Developer
    VB6 Ent (SP5), Win 2000,SQL Server 2000

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width