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

Just starting out? Need help? Post your questions and find answers here.
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

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

Post 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
ARGENTINA WORLD CHAMPION
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post 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).
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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
ARGENTINA WORLD CHAMPION
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

lol. Is this a browser hijack that avoids "spywareinfo.com" for eg. (j/k)
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post 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:
--Kale

Image
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

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

Post 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.
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

Post 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
Seldon
Enthusiast
Enthusiast
Posts: 405
Joined: Fri Aug 22, 2003 7:12 am
Location: Italia

Post 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.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post 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.
User avatar
GedB
Addict
Addict
Posts: 1312
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post 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.
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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!
ARGENTINA WORLD CHAMPION
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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.
ARGENTINA WORLD CHAMPION
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Thanks PB.
ARGENTINA WORLD CHAMPION
User avatar
GedB
Addict
Addict
Posts: 1312
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post 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?
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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.
ARGENTINA WORLD CHAMPION
Post Reply