My home internet is of depressing quality, so when Windows initiates downloads without my permission, it makes every device on the network practically unable to use the internet. Disabling the services commonly at fault, Windows Update and Delivery Optimizations, through the Services and Resource Monitor GUIs is a long, multi-staged, and awkward process, so I wished to automate this. I've made the following batch file:
@echo on
:: turning off bandwidth-stealing services
NET stop "Windows Update"
NET stop "Delivery Optimization"
:: disabling those same services
SC config DoSvc start= disabled
SC config wuauserv start= disabled
Although the first two commands (after the @echo on) have not been tested while the offending services were running, it appears that they will function properly. The other two commands, however, each return the following message when executed:
[SC] OpenService Failed 5:
Access is denied.
Is there a way to get around this or otherwise gain full control over these services, or is there something else wrong with my script?