2

There is a client who would like to install a custom Java application on his business owned computers, However, he doesn't want to give the ability for the limited users to close the application, even from Windows Task Manager.

The purpose of the application is to monitor some specific resources and do several tasks silently. The users of these computers will be aware of this software and what it does exactly.

I couldn't find a way to do this by using the Java programming language! Is it possible or it's mainly related to Windows users' permissions and capabilities system?

13
  • 1
    Why would you want that? Your application should always close gracefully when the user wants it to. If they don't want your program running, it shouldn't be running. Commented May 29, 2012 at 9:49
  • 1
    @Tharwen, not true, e.g. what if the user was an employee using some company's computer. It's upto the company what they want running on the pc. Commented May 29, 2012 at 9:51
  • 1
    @Ash Then why does the employee have access to task manager? Commented May 29, 2012 at 9:52
  • 1
    @Tharwen, they might not but task manager isn't the only way of stopping a program. The point is there are times when this is appropriate. Commented May 29, 2012 at 9:54
  • 1
    @Ash and my point is that anyone who has been deemed responsible for what's running on their computer (by being given access to tools for managing that) should always be able to control what's running on their computer. Commented May 29, 2012 at 9:58

3 Answers 3

5

You can't do such a thing in the program itself. It is more of a system level thing. Try launching the JVM (java.exe) as a System process.

Sign up to request clarification or add additional context in comments.

5 Comments

There is nothing called "You Can't" Iam sure there is a native way to do it !
Sure, there is a thing called "You Can't" when it comes to basic OS security features, such as a process not being able to elevate itself to some kind of invincible state, where the OS cannot kill it anymore.
This answer is correct. If there isn't a way to do it, there isn't a way to do it.
support.microsoft.com/kb/251192 in case you want to learn how to execute the sc command to create a Windows service.
Ok , see this screenshout it's for program called CafeAgent , I try to close it by all ways I read about ( pskill , proesshacker .. etc )
3

You could run it as a Windows service, started by the Administrator. That way, users won't be able to close the process as they do not have high enough privileges.

Refer to http://wrapper.tanukisoftware.com/doc/english/download.jsp for a fantastic wrapper that you can use.

For a short tutorial, look at http://wrapper.tanukisoftware.com/doc/english/launch-win.html

6 Comments

It's looks interesting , Can you explane how to use it ? and is it easy to install it on the computer ?
All you need is to know how to execute the sc command. Have a read at support.microsoft.com/kb/251192
There's numerous tutorials available, some on the site, some in the downloads. I use it often to install a Java application as a Windows Service using standard installation software. Basically, it wraps the Java runtime as a Windows service that executes your application.
I've added a direct link to the Windows service tutorial.
Excellent - I've seen it used quite often and have only heard great things about it.
|
0

Having something unclosable and invisible sounds unethical, but I'd imagine it does have legitimate uses. If it is for something worthwhile like protecting vulnerable people online etc. then they should probably not have task manager access in the first place, preventing them from stopping the JVM. Consider user privileges over attempting to code around corners.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.