Solved Not allowed to stop services in BAT file?

snadge

Member
Member
Messages
40
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 Computer

System One

  • OS
    Windows 8.1 Pro x64
    Computer type
    PC/Desktop
    CPU
    Intel 3470 @ 3.67Ghz
    Motherboard
    Gigabyte H77
    Memory
    8Gb Crucial Ballistix Sport @ 1616Mhz 8-8-8
    Graphics Card(s)
    Gigabyte GTX650 @ 1.1Ghz
    Sound Card
    Via HD 7.1 108db SNR
    Monitor(s) Displays
    LG Flatron 19"
    Screen Resolution
    1440x900
    Hard Drives
    1 x 250Gb Samsung EVO 850 (520,500,90,000,0.44ms)
    500Gb Seagate HDD
    PSU
    XFX 450 Pro Core Edition
    Cooling
    Arctic Freezer Pro
    Keyboard
    wifi combo Q-Connect
    Internet Speed
    16Mbps
    Browser
    Chrome
    Antivirus
    Private Firewall + WinPatrol

Brink

Administrator
Administrator
mvp
Messages
25,076
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 Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    16 GB (8GBx2) G.SKILL TridentZ DDR4 3200 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 970 EVO Plus M.2,
    250GB Samsung 960 EVO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Arris SB8200 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Lumia 1520 phone

snadge

Member
Member
Messages
40
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 Computer

System One

  • OS
    Windows 8.1 Pro x64
    Computer type
    PC/Desktop
    CPU
    Intel 3470 @ 3.67Ghz
    Motherboard
    Gigabyte H77
    Memory
    8Gb Crucial Ballistix Sport @ 1616Mhz 8-8-8
    Graphics Card(s)
    Gigabyte GTX650 @ 1.1Ghz
    Sound Card
    Via HD 7.1 108db SNR
    Monitor(s) Displays
    LG Flatron 19"
    Screen Resolution
    1440x900
    Hard Drives
    1 x 250Gb Samsung EVO 850 (520,500,90,000,0.44ms)
    500Gb Seagate HDD
    PSU
    XFX 450 Pro Core Edition
    Cooling
    Arctic Freezer Pro
    Keyboard
    wifi combo Q-Connect
    Internet Speed
    16Mbps
    Browser
    Chrome
    Antivirus
    Private Firewall + WinPatrol

Brink

Administrator
Administrator
mvp
Messages
25,076

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    16 GB (8GBx2) G.SKILL TridentZ DDR4 3200 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 970 EVO Plus M.2,
    250GB Samsung 960 EVO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Arris SB8200 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Lumia 1520 phone

snadge

Member
Member
Messages
40
thanks :)
 

My Computer

System One

  • OS
    Windows 8.1 Pro x64
    Computer type
    PC/Desktop
    CPU
    Intel 3470 @ 3.67Ghz
    Motherboard
    Gigabyte H77
    Memory
    8Gb Crucial Ballistix Sport @ 1616Mhz 8-8-8
    Graphics Card(s)
    Gigabyte GTX650 @ 1.1Ghz
    Sound Card
    Via HD 7.1 108db SNR
    Monitor(s) Displays
    LG Flatron 19"
    Screen Resolution
    1440x900
    Hard Drives
    1 x 250Gb Samsung EVO 850 (520,500,90,000,0.44ms)
    500Gb Seagate HDD
    PSU
    XFX 450 Pro Core Edition
    Cooling
    Arctic Freezer Pro
    Keyboard
    wifi combo Q-Connect
    Internet Speed
    16Mbps
    Browser
    Chrome
    Antivirus
    Private Firewall + WinPatrol

snadge

Member
Member
Messages
40
:)

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

thanks again
 

My Computer

System One

  • OS
    Windows 8.1 Pro x64
    Computer type
    PC/Desktop
    CPU
    Intel 3470 @ 3.67Ghz
    Motherboard
    Gigabyte H77
    Memory
    8Gb Crucial Ballistix Sport @ 1616Mhz 8-8-8
    Graphics Card(s)
    Gigabyte GTX650 @ 1.1Ghz
    Sound Card
    Via HD 7.1 108db SNR
    Monitor(s) Displays
    LG Flatron 19"
    Screen Resolution
    1440x900
    Hard Drives
    1 x 250Gb Samsung EVO 850 (520,500,90,000,0.44ms)
    500Gb Seagate HDD
    PSU
    XFX 450 Pro Core Edition
    Cooling
    Arctic Freezer Pro
    Keyboard
    wifi combo Q-Connect
    Internet Speed
    16Mbps
    Browser
    Chrome
    Antivirus
    Private Firewall + WinPatrol

Brink

Administrator
Administrator
mvp
Messages
25,076
You're most welcome. :)
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    16 GB (8GBx2) G.SKILL TridentZ DDR4 3200 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 970 EVO Plus M.2,
    250GB Samsung 960 EVO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Arris SB8200 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Lumia 1520 phone
Top