Results 1 to 11 of 11

Thread: How to keep program from being shutdown via NT task manager

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Location
    Texas
    Posts
    29

    Question

    I'd like to have a program run in the back ground, not be shown in the NT task manager Application listing - these
    things I can do.

    I'd also like to do one of two additional things. Hide the program from the
    NT task manager Processes listing, or be able to have the program unable to be shutdown like the system exe's -
    when a user tried to shut one down using the
    processes listing in task manager, a window pops up and says
    "The operation could not be completed. Access Denied."

    Thanks in advance.

    Lawson.

  2. #2
    New Member
    Join Date
    Oct 2000
    Posts
    6

    i know absoultly nothing about VB but...

    I don't know alot about VB but i program alt of languages and I am trying to learn VB. Just a suggestion (don't know if it will work) but can you write a function that executes on exit that would recall the program? or write another program with a timer pulse of 1 and boot the program if it is closed. Just some small ideas from a newbie

    Hope that helps,
    Mallek

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Location
    Texas
    Posts
    29
    Mallek

    Thanks for the input. Yes, those suggestions could be the
    next best options, if I cannot do what I really want.

  4. #4
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    You can use the form_QueryUnload method to prevent the app from being closed. If UnloadMode = 3 then set Cancel to True.

    The following are possible values for UnloadMode.
    Code:
    QueryUnload values for UnloadMode
    
    Constant           Value  Description 
    vbFormControlMenu  0      User has chosen Close command from the Control-menu box on a form 
    vbFormCode         1      Unload method invoked from code 
    vbAppWindows       2      Current Windows session ending 
    vbAppTaskManager   3      Windows Task Manager is closing the application 
    vbFormMDIForm      4      MDI child form is closing because the MDI form is closing

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Location
    Texas
    Posts
    29
    ccoder

    Thanks for the info, but this still allows for user to shut down program thru the end task option in task manager/process list.

  6. #6
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177

  7. #7
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    Originally posted by ccoder
    Then take a look at http://forums.vb-world.net/showthrea...threadid=32670
    Link is broken

  8. #8
    Addicted Member Vitani's Avatar
    Join Date
    Jul 2001
    Location
    England
    Posts
    134
    If you can dream it, you can do it - Moo Power!

  9. #9
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Why?

    Why do you want to write an indestructible, phantom program?

    I know that I wouldn't want any program running surreptitiously on my PC that I had absolutely no control over, and the Task manager is typically the last resort.

    I already feel like I'm constantly competing with Microsoft for control of my own PCs. So, what's the point?
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

  10. #10
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    Becuase I am writing an app that monitors people's internet usage and they can disable it if they want and turn it on when they want. THAT is not good.

  11. #11
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

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