PureBasic Forum
https://www.purebasic.fr/english/

Hide on taskmanager? i dont want no one to close my app
https://www.purebasic.fr/english/viewtopic.php?f=13&t=9478
Page 1 of 2

Author:  ricardo [ Wed Feb 11, 2004 6:03 pm ]
Post subject:  Hide on taskmanager? i dont want no one to close my app

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

Author:  GPI [ Wed Feb 11, 2004 7:55 pm ]
Post subject: 

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).

Author:  ricardo [ Wed Feb 11, 2004 10:14 pm ]
Post subject: 

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

Author:  Dare2 [ Wed Feb 11, 2004 11:19 pm ]
Post subject: 

lol. Is this a browser hijack that avoids "spywareinfo.com" for eg. (j/k)

Author:  Kale [ Thu Feb 12, 2004 1:42 am ]
Post subject: 

Quote:
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:

Author:  PB [ Thu Feb 12, 2004 1:42 am ]
Post subject:  Re: Hide on taskmanager? i dont want no one to close my app

> 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:
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: http://forums.purebasic.com/english/vie ... 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.

Author:  PolyVector [ Thu Feb 12, 2004 7:40 am ]
Post subject: 

Or better yet... Change the last line to:
Code:
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

Author:  Seldon [ Thu Feb 12, 2004 9:32 am ]
Post subject: 

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.

Author:  PB [ Thu Feb 12, 2004 2:04 pm ]
Post subject: 

> 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.

Author:  GedB [ Thu Feb 12, 2004 3:37 pm ]
Post subject: 

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.

Author:  ricardo [ Thu Feb 12, 2004 5:22 pm ]
Post subject: 

Kale wrote:
Quote:
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!

Author:  ricardo [ Thu Feb 12, 2004 5:25 pm ]
Post subject: 

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.

Author:  ricardo [ Thu Feb 12, 2004 5:39 pm ]
Post subject: 

Thanks PB.

Author:  GedB [ Thu Feb 12, 2004 7:05 pm ]
Post subject: 

Quote:
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?

Author:  ricardo [ Thu Feb 12, 2004 7:57 pm ]
Post subject: 

GedB wrote:
Quote:
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.

Page 1 of 2 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/