But at this time I need only shortcuts for windows update service. I don't keep windows update service running all time but windows store needs windows update service running. I want to enable+start windows update service before opening windows store with shortcut and disable+stop windows update service after closing windows store.
I found some good answers to restart a service here : https://stackoverflow.com/questions/1995847/desktop-shortcut-to-restart-a-windows-service
Any help will be useful for me and people with same need.
WORKED FOR ME: (windows 10)
I created two text files & paste those one line code in each (see accepted answer)
I changed those files extension to .bat
I created 2 shortcuts for both files
I edited those 2 shortcuts to run as admin, > right click on shortcut > click "properties" > go to "shortcut" tab > click "advanced" > tick "run as administrator" > OK > OK
INFO: to get any service name. Go to "services" > right click any service > properties > see service name.
Best Answer
How do I enable/start and stop/disable the Windows Update Service from
cmd
?You can do this using
sc
commands.wuauserv
with the service name.Enable/Start:
Stop/Disable:
Example output:
Further Reading