Add files via upload

This commit is contained in:
Molly Lau 2021-02-21 19:26:25 +09:00 committed by GitHub
parent b97e6fdd1a
commit e22d1d4a8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,32 @@
@echo off
::set color
color DE
echo Checking administrator authority...
net session >nul 2>&1
if %errorLevel% == 0 (
goto continue
) else (
echo,
echo Please run me as an administrator!
echo Press any key to exit...
pause > nul
exit
)
:continue
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /ve 2>nul | findstr "WindowsUpdate" > nul
if %errorLevel% == 0 (
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f
echo The update of your system has been enabled.
echo Please restart your system!
) else (
echo The update of your system has been enabled!
)
echo Press any key to exit
pause > nul
exit