Windows 8 and 8.1 Forums


Not allowed to stop services in BAT file?

  1. #1


    Posts : 40
    Windows 8.1 Pro x64

    Not allowed to stop services in BAT file?


    Hi

    I use BATCH files to start and stop my Anti-Virus because my system isnt great and I use real-time cpu intensive music applications, so i have an AV ON and AV OFF bat file that starts AVAST and closes AVAST...

    here is the code, the tskill works, but stopping the service doesnt.

    NET STOP "avast! Antivirus"

    tskill AvastUI


    the error says something about not being allowed, it obviously doesnt have the privelages... How do I amend this?

    thanks

      My System SpecsSystem Spec

  2. #2


    Posts : 22,577
    64-bit Windows 10


    Hello Snadge,

    See if the bat file will work properly if you right click on it, and click on Run as administrator.

    Hope this helps,
    Shawn
      My System SpecsSystem Spec

  3. #3


    Posts : 40
    Windows 8.1 Pro x64


    yeah it does thanks...but I cant apply it in Properties?? is there any way to apply it too the file? can you apply it to a shortcut too the file? I will try

    thanks
      My System SpecsSystem Spec

  4. #4


    Posts : 22,577
    64-bit Windows 10


    Yes, you could create a shortcut of the .bat file, then set the shortcut to always Run as administrator using OPTION SIX in the tutorial below.

    Run as Administrator - in Windows 8
      My System SpecsSystem Spec

  5. #5


    Posts : 40
    Windows 8.1 Pro x64


    thanks
      My System SpecsSystem Spec

  6. #6


    Posts : 40
    Windows 8.1 Pro x64




    worked a charm, even able to add the Avast icon graphic too the shortcuts too, nice touch

    thanks again
      My System SpecsSystem Spec

  7. #7


    Posts : 22,577
    64-bit Windows 10


    You're most welcome.
      My System SpecsSystem Spec

Not allowed to stop services in BAT file?
Related Threads
How to Start, Stop, & Disable Services in Windows 8 and 8.1 A service is an application type that runs in the system background without a user interface and is similar to a UNIX daemon process. Services provide core operating system features, such as Web serving, event logging, file serving,...
How to Restore Default Services in Windows 8 and 8.1 This tutorial provides you with registry downloads that will completely restore any of the default services and their settings you want in Windows 8, Windows 8.1,and Windows 8.1 Update. This can be handy if a service was deleted by mistake, is...
I am facing a problem enabling the file history feature of my Windows 8 Pro installation. After noticing there was no activity to my backup drive, I decided to check what time the latest backup was executed; this turned out to be 3 weeks ago. I formatted the drive and decided to try set it up...
I am using MS Office Home and Student 2007. I have no issues with it and I intend to keep it. I have VMware player installed with Win 8 RP as guest OS. Host OS is Win 7 Home Premium SP1. Question : Can I install the Office 2013 Customer Preview in Win 8 RP ?...
Hi there are animated avatars allowed on the forums -- I've tried making one --it works fine on my local PC but it doesn't "Animate" when uploaded to the forum. Small .GIF file with 3 layers so shouldn't take resources . Cheers jimbo
Eight Forums Android App Eight Forums IOS App Follow us on Facebook