Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. How to restrict user from closing an application

How to restrict user from closing an application

Scheduled Pinned Locked Moved System Admin
helptutorialquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amer Rehman 0
    wrote on last edited by
    #1

    Hi Can anybody tell me how to restrict user from closing an application. The scenario is, I have developed a time controller/recorder for users. Input form displays in the startup. User sets time on it and then it goes to systray and after the set time has passed, it shutsdown the system after givia warning or, if user wishes to do so, allows him to start another session. I have removed the control box but the problem is that the user can still close it with Alt + F4 Command. Thanks How this can be handled?

    reman

    O 1 Reply Last reply
    0
    • A Amer Rehman 0

      Hi Can anybody tell me how to restrict user from closing an application. The scenario is, I have developed a time controller/recorder for users. Input form displays in the startup. User sets time on it and then it goes to systray and after the set time has passed, it shutsdown the system after givia warning or, if user wishes to do so, allows him to start another session. I have removed the control box but the problem is that the user can still close it with Alt + F4 Command. Thanks How this can be handled?

      reman

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      I don't think you'll ever be able to compleatly stop the user from shutting down the application if they want to without resorting to use a Group Policy to lock down the machine. Even if you stop alt-f4 they can still use the taskamanager to kill the process.

      V 1 Reply Last reply
      0
      • O originSH

        I don't think you'll ever be able to compleatly stop the user from shutting down the application if they want to without resorting to use a Group Policy to lock down the machine. Even if you stop alt-f4 they can still use the taskamanager to kill the process.

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        originSH wrote:

        taskamanager to kill the process

        Process permissions? Normally users can kill processes running as Windows services right?

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        O 1 Reply Last reply
        0
        • V Vasudevan Deepak Kumar

          originSH wrote:

          taskamanager to kill the process

          Process permissions? Normally users can kill processes running as Windows services right?

          Vasudevan Deepak Kumar Personal Homepage Tech Gossips

          O Offline
          O Offline
          originSH
          wrote on last edited by
          #4

          Windows services can be killed unless they are running as a system account. But you shouldn't have an app that can interact with the desktop running as the system account ;) It then also creates more problems when you want to use the users credentials.

          D 1 Reply Last reply
          0
          • O originSH

            Windows services can be killed unless they are running as a system account. But you shouldn't have an app that can interact with the desktop running as the system account ;) It then also creates more problems when you want to use the users credentials.

            D Offline
            D Offline
            Dan Neely
            wrote on last edited by
            #5

            IIRC the way to do it is to have a service running as system with all the logic, and a UI only app running in userland and use IPC to have the service feed data into the apps UI and restart it if closed.

            -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

            O 1 Reply Last reply
            0
            • D Dan Neely

              IIRC the way to do it is to have a service running as system with all the logic, and a UI only app running in userland and use IPC to have the service feed data into the apps UI and restart it if closed.

              -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

              O Offline
              O Offline
              originSH
              wrote on last edited by
              #6

              Hmmmm thats a nice solution :) I'm currently working on Web Service using IPC remoting for talking with its front end. It would'nt take much more for it to monitor and restart the front end. It's also nice how in the future it should be relativly easy to switch over to tcp remoting and have a central management app :D

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups