How To Prevent An App from Closing (Windows 7)

-1

I have installed TeamViewer on a client Computer X using an Administrator Account. I have configured TeamViewer to autostart, and the account that would use it would be ideally a standard user account(no such account exists yet, but I plan to create it after I'm done with setting up the Teamviewer. Ideally because Teamviewer is installed to manage a particular application that has been configured and utilised through the administrator account, and I'm not sure the user account would have access to the administrator account data).

I want to prevent the standard user account from closing the TeamViewer application.

In the case that I may have to leave access to the administrator account, I would want to prevent them from closing it normally (making windows treat it as a critical system program perhaps?) or failing that, they may require command prompt access to close the program (I doubt the person(s) using the program know how to work their way around command prompt, but this is undesired as learning "taskkill" is trivial.

Tobi Alafin

Posted 2017-05-21T16:55:20.460

Reputation: 221

Answers

1

If you setup teamviewer for unattended access, it will be installed as a service. You can configure the service to attempt to restart itself up to 3 times. (a user who is smart enough to try task manager or similar to kill it will stop after a 2nd time when the program comes back, not knowing there is a 3 time is the charm.

In addition, you can simply enable a setting in teamviewer preventing it to be closed, and add a password to the settings and you simply cannot close teamviewer without going through tremendous effort.

LPChip

Posted 2017-05-21T16:55:20.460

Reputation: 42 190

How do I configure the service to attempt to restart itself up to 3 times. – Tobi Alafin – 2017-05-21T18:03:05.390

Go to services, Open the service in question, go to the Recovery tab. Change the recoveries from Do nothing to Restart. Do notice, In TeamViewer 12, It will try to recover 2 times. You can still make it recover a 3rd time if you want. – LPChip – 2017-05-21T19:30:21.313

I can still close teamviewer using taskkill and '/f' '/t' switches. I have to leave the administrator account currently.available, as the program being used does not sync well the standard user account. – Tobi Alafin – 2017-05-22T00:29:00.700

Yes, you can close teamviewer that way, and unless the user does not have administrative privileges, you can't prevent it. But setting up recovery should restore teamviewer after its being killed. – LPChip – 2017-05-22T06:43:33.663