?
Solved

Hiding a program from the task manager...

Posted on 2003-03-01
5
Medium Priority
?
276 Views
Last Modified: 2012-05-05
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)
0
Comment
Question by:Zero42
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Expert Comment

by:echobravo316
ID: 8047922
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.
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 8048008
Sounds like you are trying to make a trojan. This is not the place for such questions.
0
 
LVL 5

Accepted Solution

by:
jayeshshah earned 700 total points
ID: 8048307
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
        Else
            '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
Function FINDCDLETTERS()
Dim tmp As Integer
Dim tmpStr As String
Dim Drives As String
Dim CDsCount As Integer
Dim CDsLetters As String
Const DRIVE_CDROM = 5

'init Drives to 255 spaces
Drives = Space(255)
'get drives, Drives var will look like
'   A:\<NULL>C:\<NULL>D:\<NULL>E:\<NULL><NULL>
'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
FINDCDLETTERS = CDsLetters
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)
Else
    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.
strcd = FINDCDLETTERS
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)
Next

'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

---------------------------------------------------------

K'Regards

Jayesh
0
 

Author Comment

by:Zero42
ID: 8049060
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.
0
 

Expert Comment

by:WarLord
ID: 8049627
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
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

800 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