N
N
Nikita Samarin2016-01-26 19:48:09
System administration
Nikita Samarin, 2016-01-26 19:48:09

How to remove the ability for the user to close the program?

I already asked this question recently, I was advised to run the program as a different user. Allegedly, he will not have the rights to close programs launched from under the administrator. I created a task in Task Scheduler.
Task code

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2015-01-27T18:30:34</Date>
    <Author>Pete</Author>
  </RegistrationInfo>
  <Triggers>
    <LogonTrigger>
      <StartBoundary>2015-01-27T18:30:00</StartBoundary>
      <Enabled>true</Enabled>
    </LogonTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>WIN-H9OUVR61LNP\testUser</UserId>
      <LogonType>InteractiveToken</LogonType>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>"c:\Users\user\Documents\Visual Studio 2012\Projects\WorkersController\WorkersController\bin\Debug\WorkersController.exe"</Command>
    </Exec>
  </Actions>
</Task>

Unless the task is launched under the current user testUser (ordinary user), otherwise the program simply did not start.
Well, the user calmly kills this program in the task manager. Even if I log into the user account and run it as an administrator (shift+rClick->Run as another user) my program, the user can still kill the process.
I don't want to take away the user's ability to call the task manager, block alt+f4 presses, intercept system calls, etc... etc... Is it possible to "just" forbid the user to close programs?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
res2001, 2016-01-26
@virty90

The scheduler checks every minute for the running of the desired application, if it is not running, it starts. As a result, the user will eventually get tired of killing the process. Naturally, the user should not have the rights to delete the job in the scheduler.

A
Alexey Trofimenko, 2016-01-27
@AdmAlexus

Have you tried starting the program as a service?
How to do this is described for example here .

S
shalaev, 2016-02-04
@shalaev

There is a PROGRAM and windows
It would be desirable to permit the user to work with the program, but to forbid to close it.
Can this be done and how???

bash.im/quote/1845

S
Saboteur, 2016-01-26
@saboteur_kiev

With administrative rights, the user can kill almost any process.
Make a user without administrative rights, and he will not be able to kill other people's processes.
You can generally slaughter the user's rights, protecting him from the ability to install third-party software or run unauthorized things. But not the administrator.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question