Prevent app from showing up in Task Manager (WinXP, VB .NET)

  • Thread starter Thread starter Stephen Corey
  • Start date Start date
S

Stephen Corey

I'm trying to detect when users run games (solitaire, freecell, etc..)on all
PCs on my network. Because of the Windows File Protection system won't let
me overwrite the game executables, it looks like I'm forced to write an app
that runs in the background and waits for sol.exe (for example) to show up
in the process list. The problem is that my app is showing up when they do
an "ALT-TAB". How can I prevent this from being listed in there, and
possible under the "Applications" tab of the task manager. I don't care if
it's in the "Processes" tab of the task manager, though.
 
I've read this somewhere on a news group and just tried it to verify that it
works. Simply set the "ShowInTaskbar" property of the main form to "False"
and the application won't appear in the "Applications" tab. However, this
doesn't hide the application from the ALT+TAB list. If you need to hide the
app from the ALT+TAB display or don't have a main form then you may need to
look into writing a windows service. These don't appear in the
"Applications" tab or the ALT+TAB listing and can automatically be started
when the computer is booted. This would be my suggestion if you want the
process to run in the background without the user's knowledge or
intervention.
 
If you create an app with no forms then it won't appear in either the ALT-TAB or Applications tab of the task manager. It will however appear in the Processes tab of Task Manager but there is no way to stop this showing up. If you don't already know how to create an app without a form then it is simply a case of adding a module with a Public Sub Main function in, OR a class with Public Shared Sub Main in and putting your code in the Sub Main procedure. You will then need to set the startup object of project to be Sub Main

Hope this helps

Gary
 
Stephen,
I'm trying to detect when users run games (solitaire, freecell, etc..)on all
PCs on my network. Because of the Windows File Protection system won't let
me overwrite the game executables, it looks like I'm forced to write an app
that runs in the background and waits for sol.exe (for example) to show up
in the process list.

Can't you just uninstall the games?



Mattias
 
I may be wrong. But couldn't you run it as a service?

That won't show up in the application list, but will show up in the process
list.

It's worth a shot.
 
Stephen Corey said:
I'm trying to detect when users run games (solitaire, freecell, etc..)on all
PCs on my network. Because of the Windows File Protection system won't let
me overwrite the game executables, it looks like I'm forced to write an app
that runs in the background and waits for sol.exe (for example) to show up
in the process list. The problem is that my app is showing up when they do
an "ALT-TAB". How can I prevent this from being listed in there, and
possible under the "Applications" tab of the task manager. I don't care if
it's in the "Processes" tab of the task manager, though.

Stephen, go with CJ's suggestion, make it a system service. Plus, you can
do a poll every few seconds on what processes are running, so when sol.exe
does pop up, have your new service kill it immediatly! That's funner than
deleting it, it drives the users nutz! Want to have some fun? I've got
some nifty screen effects that you can do, so when they start up an
"offending' app, it not only kills the app, but appears tto kill the PC, or
the loud bells and whistles approach, uhmm, let's see *dig dig dig* *
clieckety click click * Ohh, just log thier butts off and watch them squerrm
as they ust lost a few hours of work because they wanted to play Solitare!
Ha, teach those wankers!!!

Sorry, I get carried away, it's pent up frrustraition at my users, they're
soo stoopid that they'd hit the power button, which causes me more work.

HTH,
Sueffel
 
Sueffel said:
Stephen, go with CJ's suggestion, make it a system service. Plus, you can
do a poll every few seconds on what processes are running, so when sol.exe
does pop up, have your new service kill it immediatly! That's funner than
deleting it, it drives the users nutz! Want to have some fun? I've got
some nifty screen effects that you can do, so when they start up an
"offending' app, it not only kills the app, but appears tto kill the PC, or
the loud bells and whistles approach, uhmm, let's see *dig dig dig* *
clieckety click click * Ohh, just log thier butts off and watch them squerrm
as they ust lost a few hours of work because they wanted to play Solitare!
Ha, teach those wankers!!!

I love the british...
Sorry, I get carried away, it's pent up frrustraition at my users, they're
soo stoopid that they'd hit the power button, which causes me more work.

I see the BOFH rides again.
 
Back
Top