Hiding a program from the task manager...

Actually I have three questions.

1) How can I make a program invisible in the task manager?

2) How can I have the program I make install itself so it starts up on windows boot up?

3) How can I open and close the cdrom, and have access to things like the mouse and keyboard drivers.(for instance to disable or enable the mouse)
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1.)To make the program invisible to the taskmanager, click on the title bar of the program in VB and go to properties.  Then find ShowInTaskBar and select False.

2.)I prefer to use a program called Inno Setup.  Inno Setup is an extremely easy self-install program if you use the wizard.  You can download it free.

3.)No idea.  Let me know if you find out (mattp316@optonline.net).

Thanks-Hope it helped.
Sounds like you are trying to make a trojan. This is not the place for such questions.
1. To hide the program from the Taskmanager write the below code in the form load.
App.Taskvisible = False

2. Try using Setup programs like Installshield in which you would have to write a script or change the existing project in the Setup1.vbp file existing in C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Setup1.

3. open and close the cdrom. use the below mentioned code

Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long

Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" _
(ByVal nDrive As String) As Long
Private Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long

Private Const DRIVE_CDROM = 5

'I found this code somewhere on the net - It's very useful
Public Sub cdDriveDoor(OpenDoor As Boolean, Optional DriveLetter As String = "")

Dim mssg As String * 255 'makes a string with 255 blank spaces
Dim DriveType As Long

    If DriveLetter <> "" Then
    'make sure the drive entered is a cd drive
    DriveType = GetDriveType(DriveLetter)
        If DriveType <> DRIVE_CDROM Then
            MsgBox DriveLetter & " is not a cd-rom drive", vbOKOnly + vbCritical, "Error"
            Exit Sub
        End If
        If OpenDoor = True Then 'open the drive door
            'open the drive as a cdaudio device
            mciSendString "Open " & DriveLetter & " Type cdaudio Alias cd", mssg, 255, 0
            'open the door
            mciSendString "set cd door open", 0&, 0, 0
            'close the drive as a cdaudio device
            mciSendString "close cd", 0&, 0, 0
        Else 'close the drive door
            'open the drive as a cdaudio device
            mciSendString "Open " & DriveLetter & " Type cdaudio alias cd", mssg, 255, 0
            'close the door
            mciSendString "set cd door closed", 0&, 0, 0
            'close the drive as a cdaudio device
            mciSendString "close cd", 0&, 0, 0
        End If
    Else 'no driveletter entered
        If OpenDoor = True Then
            'open the door of the default cdaudio device (first cd drive)
            mciSendString "set cdaudio door open", 0&, 0, 0
            'close the door of default device
            mciSendString "set cdaudio door closed", 0&, 0, 0
        End If
    End If
End Sub

'Again I found this function
Dim tmp As Integer
Dim tmpStr As String
Dim Drives As String
Dim CDsCount As Integer
Dim CDsLetters As String

'init Drives to 255 spaces
Drives = Space(255)
'get drives, Drives var will look like
'ret& is the new length of Drives
ret& = GetLogicalDriveStrings(Len(Drives), Drives)
For tmp = 1 To ret& Step 4
 'get a drive root directory (like "C:\")
 tmpStr = Mid(Drives, tmp, 3)
 'if drive is a CD
 If GetDriveType(tmpStr) = DRIVE_CDROM Then
  CDsCount = CDsCount + 1
  CDsLetters = CDsLetters & Left(tmpStr, 1) '& " "
 End If
Next tmp
End Function

Private Sub CDBUTTON_Click(Index As Integer)
'If button changes its caption to display either oper of closed
If InStr(1, CDBUTTON(Index).Caption, "Open", vbTextCompare) <> 0 Then
    cdDriveDoor True, Right(CDBUTTON(Index).Caption, 1) & ":\"
    CDBUTTON(Index).Caption = "Close " & Right(CDBUTTON(Index).Caption, 1)
    cdDriveDoor False, Right(CDBUTTON(Index).Caption, 1) & ":\"
    CDBUTTON(Index).Caption = "Open " & Right(CDBUTTON(Index).Caption, 1)
End If

End Sub

Private Sub Form_Load()
'on loading the function finds all CD-ROMS and makes buttons for each.
If Len(strcd) = 0 Then Exit Sub

CDBUTTON(1).Caption = "Open " & Mid(strcd, 1, 1)

For X = 2 To Len(strcd)
    Load CDBUTTON(X)
    CDBUTTON(X).Visible = True
    CDBUTTON(X).Top = CDBUTTON(X - 1).Top + CDBUTTON(X - 1).Height + 100
    CDBUTTON(X).Left = CDBUTTON(X - 1).Left
    CDBUTTON(X).Width = CDBUTTON(X - 1).Width
    CDBUTTON(X).Height = CDBUTTON(X - 1).Height
    CDBUTTON(X).Caption = "Open " & Mid(strcd, X, 1)

'resizes the form to suit all of the buttons.
X = X - 1
Me.Height = CDBUTTON(X).Top + CDBUTTON(X).Height + 500
Me.Width = CDBUTTON(X).Width + CDBUTTON(X).Left

End Sub




Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Zero42Author Commented:
No, it isn't a trojan. I'm writing software to monitor my sons activity on his computer. He keeps finding ways around the software I bought so I want something that he doesn't know is running and something I can mess with him with. I don't believe in the creation or use of trojans.
well if you have windows xp or windows 2000  and he get's around the software you installed for him... he will get around this one to i think...because task manager is very handy .... program's that aren't showed up in the active screens will show up in the processes list i don't think there's a solution for that
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

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.