-2

Windows Update can't be completely stopped unless you delete Windows Update service:

sc delete wuauserv

I did that on a machine we had, because of strict policies about updates.

Now I'm gonna install Microsoft Visual C++ Redistributable and I receive this error that the specified service does not exist:

enter image description here

As I searched it seems that this package's installation is done through Windows Update (stupid) and I need to re-install Windows Update back so that I can install this package, and remove it again.

But I can't find a solution on how to re-install Windows Update on Windows Server 2012. All I found is about WSUS, or about some other trouble that assumes that Windows Update is already working, or about DSIM which can't be found on my machine, etc.

So, anyone can help me re-installing the Windows Update service, AKA wuauserv?

Saeed Neamati
  • 451
  • 2
  • 8
  • 18
  • 6
    It's not stupid to install Windows components using Windows Update. Forcefully disabling updates on a server by removing the service is. – Esa Jokinen Jan 12 '19 at 11:49
  • 1
    Do you have another 2012 server you could export the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv from and import that on this computer? I would probably then restart the computer. Otherwise, maybe another CurrentControlSet on this computer has the service entry? E.g. HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\wuauserv You could export from that to a .reg and then rename the ControlSet001 to CurrentControlSet and import. If this doesn't work, I assume a sc.exe command to create the service might also work. – HelpingHand Jan 12 '19 at 12:58
  • Yeah, `sc create` is the way to go. You'll need to find or install a pristine Windows 2012 server (or a Windows 8 machine would do at a pinch) to look up the correct configuration details. – Harry Johnston Jan 12 '19 at 22:38
  • @EsaJokinen, stupid is when OS doesn't obey you. Policy is policy. A server might not want update in any circumstances. That's a policy and let's not talk about that. But how to prevent it when internet connection is always on? Go ahead, find a solution for stupid Windows. We did that, because even when you **disable** the **Windows Update** service, after a while it gets enabled again. – Saeed Neamati Jan 13 '19 at 09:16
  • Windows Update can be configured to schedule the updates on a time more appropriate and even only update when you manually launch the process. Not updating at all is a **stupid policy**. – Esa Jokinen Jan 13 '19 at 09:19
  • @EsaJokinen, let's agree that you're right. We're stupid. But we stupid people have an objective question. We messed up, and now we want to clean that mess. Could you please guide me in that case? – Saeed Neamati Jan 13 '19 at 09:30
  • @HelpingHand is close. You need to copy the registry keys from somewhere (possibly another server) and register the service again. – Esa Jokinen Jan 13 '19 at 09:34
  • @HelpingHand, could you please repost your comment as the answer. It worked like a charm. – Saeed Neamati Jan 14 '19 at 18:11

1 Answers1

1

You have to reinstall Windows Server.
Since you deleted a system service, you can't trust this server anymore because nobody can tell you which system components/services are now broken.

When the server is reinstalled, you can disable Windows Update with this group policy:

Computer configuration -> Administrative templates -> Windows Components -> Windows Update -> "Configure automatic updates" set it to "disabled".

Swisstone
  • 6,725
  • 7
  • 22
  • 32
  • Your solution to car problems is like buying a new car if you took out a simple wire, instead of fixing it. That's not the solution. For any reason, we deleted a system service. There has to be a way to fix it, and that way should not be to reinstall the whole server. – Saeed Neamati Jan 14 '19 at 07:23