Monday, October 2, 2017

windows 7 - A .bat file to close two services running in background

I have a Windows 7 computer with three accounts (in hierarchical order):



  1. Administrator (with password) type Administrator

  2. Guest (with a password different from that of Administrator) type administrator

  3. User (no password) type Standard user


On User's account, how can I create a batch file that once launched performs the following tasks:



  • Stop the service called Teamviewer active in the background

  • Stop the service Panda Cloud Office Protection

  • Open the browser explorer in "InPrivate mode"

  • Delete from the window event registry the three action previously held


A second batch file would serve to come back to the original situation, so it should operate like this:



  • Close the browser

  • Activate the service Panda Cloud Office Protection

  • Activate the service teamviewer

  • Delete the event log window of these three actions after having carried out


The two files would be launched in need through links on which it was previously activated the option Run as Administrator.


I want to avoid entering each time the administrator password or the guest to confirm the execution of the batch (I know both passwords).


Ultimately I would like to disable the two services with a click without I'll be prompted for the password, and without this being stored in the event log. Once I will end my search on the internet all will be set to the initial state just with a second click on the second .bat file.

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...