Answer the question
In order to leave comments, you need to log in
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>
Answer the question
In order to leave comments, you need to log in
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.
Have you tried starting the program as a service?
How to do this is described for example here .
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???
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 questionAsk a Question
731 491 924 answers to any question