Question:

How to hide Process and task for C# lock dialog?

by  |  earlier

0 LIKES UnLike

I have a Program that has a security feature which allows you to lock the form. The only problem is that the forms task is visible in the task manager. Is it possible to hide the task and process from the user so the only way to end it is by inputting the password and user-name. I am using Windows Vista and Visual C# Express 2008

 Tags:

   Report

2 ANSWERS


  1. There are some round-about ways to do that.....but they are generally used by mal-ware and the like. I wouldn't recommend doing such a thing, as it involves messing around with admin rights and what not. It is pretty much a bad idea, and is likely to get your program terminated by an anti-virus. Plus, taking control from the user is a horrible idea. Windows already lets you lock a system in its state, such that it would preserve your form in the same way you are suggesting, and this way, you aren't jerry-rigging someone's computer so they have to restart it if they accidentally trip your lock or a bug causes it to fire prematurely.

    Unless you're programming malware, a general rule of programming is that you should never rescind control of the system from the user.


  2. EDIT -

    I'm still confused about what your program does.  If TM shows 2 forms, then that means that each form is a seperate process (i.e. program.).  So, your main form spawns another program?  

    But anyway, your program loads a document (some data file) and displays it, but you want the document inaccessible if the main user locks the program, right?

    If that's the case, then you can get much better security by encrypting each document with your own encryption method instead of trying to lock down the program.    

    Your program can keep track of which user is allowed to access which documents and the user must input a password before being allowed to view the documents available to him/her.  Since the documents can't be read by any other program, that gives you extra security.

    ----

    C# is an interpreted language and there is only so much that you can do with it.  If you want to get into something beyond basic Windows 'programming,' then you'll have to learn C/C++ and the Windows API functions.

    Anyway, hiding the task will not provide any extra security from a program cracker.  I know this because I have that knowledge.  Also, not having the task visible would be a bad idea if your program crashes and the user wants to use the TM to force your program to terminate.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.