0

Possible Duplicate:
Hide a C# program from the task manager?

Hi. I write WinForms app and i want to hide my app name in this place windows Task Manager>>Applications .how can hide when i run my app?? thanks.

Community
  • 1
  • 1
Farna
  • 1,157
  • 6
  • 26
  • 45
  • @Mat:i want to run myapp when system turned on but i want nobody understand and see it. – Farna Mar 11 '11 at 14:23
  • 1
    Gee, that doesn't sound suspicious at all... – Adam Robinson Mar 11 '11 at 14:25
  • It sounds more like you want to run myapp on other people's systems since you already understand it and know it's there. How are you planning to install it on those other systems? – David Heffernan Mar 11 '11 at 14:26
  • @David Heffernan :i'm admin and i install my app but i don't want the users understand that myapp is run. – Farna Mar 11 '11 at 14:29
  • 1
    Hiding it from the Applications tab is easy: don't create a window. Hiding it from the Processes tab isn't possible. Task Manager is a tool intended for the benefit of the user, not you. The user needs it to terminate misbehaving programs. Like yours. – Hans Passant Mar 11 '11 at 14:31
  • If you don't want your users to be able to do things to this process, then don't give them admin rights. – David Heffernan Mar 11 '11 at 14:33
  • i want to get the time of login/logout of any users with myapp,and it should not been end with any users,because of this i want to hide myapp. – Farna Mar 11 '11 at 14:34
  • Doesn't Windows have a mechanism to get login/logout times of users that is both *legitimate* and *reliable*? – R. Martinho Fernandes Mar 11 '11 at 14:36
  • 1
    @na.farzane: When you ask a question you should tell us what your problem is (i.e. get login/logout times), instead of thinking you solved half of it ("I know! I'll create an app and hide it from the task manager!") and asking how to solve the other half. – R. Martinho Fernandes Mar 11 '11 at 14:43

1 Answers1

3

The application name that Task Manager shows is the Window text of the taskbar window. If you want to hide it you'll just have to set that text to an empty string.

If a blank string is no good, and you don't want your app to appear in the list at all, then don't register a taskbar button.

If you don't want your app to appear in the process list, then don't start it.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490