Page 1 of 2

Hide on taskmanager? i dont want no one to close my app

Posted: Wed Feb 11, 2004 6:03 pm
by ricardo
Hi,

Im developing a little app that checks the content of IE because i want to avoid ppl to browse to certain pages.

Its working well, but i think i should find some way to:

1.- Make the software start with windows with the minimun risk that the user find a way to stop it.

2.- User cant close the application useing task manager (ctrl alt del).

*User are regular users with no crack knowledge. Just want that average "joe user" cant close the application.

App must run in XP, 2000, NT and 9x


Thanks in advance for any ideas/tricks

Posted: Wed Feb 11, 2004 7:55 pm
by GPI
Hmm, i don't think, that it is a good idea to post a code, that hide a program in the task-manager. The danger is too high, that somebody do bad things with this. And i see such a possiblity as a security leak...

But as i know: It is possible, that not all users have access to the Task-Manager. (Don't ask how, i only see this).

Posted: Wed Feb 11, 2004 10:14 pm
by ricardo
GPI wrote:Hmm, i don't think, that it is a good idea to post a code, that hide a program in the task-manager. The danger is too high, that somebody do bad things with this. And i see such a possiblity as a security leak...

But as i know: It is possible, that not all users have access to the Task-Manager. (Don't ask how, i only see this).
Ops!!

I have some VB code that do it, but i cant find how to do 2 things:

1.- RegisterServiceProcess API Call (is not recognized by PB)

2.- App.Title = ""

How can i do this in PB?

*Note: Im not publishing the complete code, just making some specific questions

Posted: Wed Feb 11, 2004 11:19 pm
by Dare2
lol. Is this a browser hijack that avoids "spywareinfo.com" for eg. (j/k)

Posted: Thu Feb 12, 2004 1:42 am
by Kale
Make the software start with windows with the minimun risk that the user find a way to stop it.
Have you started work for G.A.I.N. ? :twisted:

Re: Hide on taskmanager? i dont want no one to close my app

Posted: Thu Feb 12, 2004 1:42 am
by PB
> Make the software start with windows with the minimun risk that the user
> find a way to stop it

Here's how I get my app to run at startup for the current user, without
adding an entry to the Startup folder menu (which they could delete):

Code: Select all

Procedure RegWriteString(section,path$,key$,value$)
  result=-1
  If RegCreateKey_(section,path$,@key)=#ERROR_SUCCESS
    datasize.l=Len(value$)
    If RegSetValueEx_(key,key$,0,#REG_SZ,@value$,datasize)=#ERROR_SUCCESS
      result=1
    EndIf 
    RegCloseKey_(key)
  EndIf
  ProcedureReturn result
EndProcedure

RegWriteString(#HKEY_CURRENT_USER,"Software\Microsoft\Windows\CurrentVersion\Run","MyApp","C:\MyApp\MyApp.exe")
> User cant close the application useing task manager (ctrl alt del)

This is in the FAQ: viewtopic.php?t=4876
Note that this only works with Win 9x and ME, and not with NT/2K/XP.
You can't hide it in NT/2K/XP for security reasons, which I think is good.

Posted: Thu Feb 12, 2004 7:40 am
by PolyVector
Or better yet... Change the last line to:

Code: Select all

RegWriteString(#HKEY_CURRENT_USER,"Software\Microsoft\Windows\CurrentVersion\RunOnce","MyApp","C:\MyApp\MyApp.exe")
Just make sure you do this EACH TIME the program runs :)
(Preferably when the proggie exits)
Less people know about this trick

Posted: Thu Feb 12, 2004 9:32 am
by Seldon
You're asking two things. To stop the CTRL-ALT-DEL you can try to make your application to look like a ScreenSaver (it works only in Win9x/Me) , see the SystemParameters() API call. RegisterServiceProcess() is an undocumented Kernel32 call, so you need to open the DLL yourself (see OpenLibray() and Callfunction() stuff). RegisterServiceProcess() does work, but it's Win9x/ME only.

Posted: Thu Feb 12, 2004 2:04 pm
by PB
> Or better yet... Change the last line to [...] RunOnce
> Just make sure you do this EACH TIME the program runs
> (Preferably when the proggie exits)

But what happens if the app crashes before it's written at exit? It'll never
run again. Also, this tip is no good for apps which don't actually exit.

Posted: Thu Feb 12, 2004 3:37 pm
by GedB
Ricardo,

What happens if somebody has installed Mozilla?

If you need to control access to the web, some sort of Proxy server is a much better approach.

Restrict access to the internet through all but your proxy server application. Then you can field all requests to the internet at a much lower level.

Posted: Thu Feb 12, 2004 5:22 pm
by ricardo
Kale wrote:
Make the software start with windows with the minimun risk that the user find a way to stop it.
Have you started work for G.A.I.N. ? :twisted:
Yes, im just trying that some students/employees CANT browse to some web pages that contains words included on a filter.
But if they fond a way to shutdown the app they will do it!

Posted: Thu Feb 12, 2004 5:25 pm
by ricardo
GedB wrote:Ricardo,

What happens if somebody has installed Mozilla?

If you need to control access to the web, some sort of Proxy server is a much better approach.

Restrict access to the internet through all but your proxy server application. Then you can field all requests to the internet at a much lower level.
But the application will run in OUR pcs and all of them has IE installed.

Posted: Thu Feb 12, 2004 5:39 pm
by ricardo
Thanks PB.

Posted: Thu Feb 12, 2004 7:05 pm
by GedB
But the application will run in OUR pcs and all of them has IE installed.
Are you also preventing users from downloading other browsers?

How is IE identified? Will an application using an embedded browser control (like PB has) be restricted?

Posted: Thu Feb 12, 2004 7:57 pm
by ricardo
GedB wrote:
But the application will run in OUR pcs and all of them has IE installed.
How is IE identified? Will an application using an embedded browser control (like PB has) be restricted?
All instances of the browser will be indetified, even the ones used by e mail clients.

The software runs very fine now, im only looking foir the best way to make it 'invisible' and to avoid that the user stops it from running.