Prevent Wiindows auto-reboot with regedit
Go to registry editor and navigate to the following registry key:
HKEY_LOCAL_MACHINE \Software\Policies \Microsoft\Windows \WindowsUpdate\AU
Change the "NoAutoRebootWithLoggedOnUsers" DWord value to the required number.
0 = False (Allow auto-reboot)
1 = True (Disallow auto-reboot)
Save and restart Windows Operating system.