zoukankan      html  css  js  c++  java
  • [工具箱]禁用Windows系统更新做了哪些操作?

    对于家用和办公电脑来说没有禁用系统更新的必要,但是对于挖矿的矿机来说为了防止Windows更新打扰到挖矿有必要禁用Windows系统更新。

    禁用Windows系统更新所作的操作内容如下:

    @echo off
    title BLOCK Win10AU!
    
    taskkill /im Windows10UpgraderApp.exe 2>nul
    del /f /q "%USERPROFILE%Desktop微软 Windows 10 易升.lnk" 2>nul
    del /f /q "%USERPROFILE%DesktopWindows 10 Update Assistant.lnk" 2>nul
    
    netsh advfirewall firewall add rule name="Block_Windows10UpgraderApp" dir=in program="%SYSTEMDRIVE%Windows10UpgradeWindows10UpgraderApp.exe" action=block
    netsh advfirewall firewall add rule name="Block_WinREBootApp32" dir=in program="%SYSTEMDRIVE%Windows10UpgradeWinREBootApp32.exe" action=block
    netsh advfirewall firewall add rule name="Block_WinREBootApp64" dir=in program="%SYSTEMDRIVE%Windows10UpgradeWinREBootApp64.exe" action=block
    netsh advfirewall firewall add rule name="Block_bootsect" dir=in program="%SYSTEMDRIVE%Windows10Upgradeootsect.exe" action=block
    netsh advfirewall firewall add rule name="Block_DW20" dir=in program="%SYSTEMDRIVE%Windows10UpgradeDW20.EXE" action=block
    netsh advfirewall firewall add rule name="Block_DWTRIG20" dir=in program="%SYSTEMDRIVE%Windows10UpgradeDWTRIG20.EXE" action=block
    netsh advfirewall firewall add rule name="Block_GatherOSState" dir=in program="%SYSTEMDRIVE%Windows10UpgradeGatherOSState.EXE" action=block
    netsh advfirewall firewall add rule name="Block_GetCurrentRollback" dir=in program="%SYSTEMDRIVE%Windows10UpgradeGetCurrentRollback.EXE" action=block
    netsh advfirewall firewall add rule name="Block_HttpHelper" dir=in program="%SYSTEMDRIVE%Windows10UpgradeHttpHelper.exe" action=block
    netsh advfirewall firewall add rule name="Block_UpdateAssistant" dir=in program="%SYSTEMROOT%UpdateAssistantUpdateAssistant.exe" action=block
    netsh advfirewall firewall add rule name="Block_UpdateAssistantCheck" dir=in program="%SYSTEMROOT%UpdateAssistantUpdateAssistantCheck.exe" action=block
    netsh advfirewall firewall add rule name="Block_Windows10Upgrade" dir=in program="%SYSTEMROOT%UpdateAssistantWindows10Upgrade.exe" action=block
    netsh advfirewall firewall add rule name="Block_UpdateAssistantV2" dir=in program="%SYSTEMROOT%UpdateAssistantV2UpdateAssistant.exe" action=block
    netsh advfirewall firewall add rule name="Block_UpdateAssistantCheckV2" dir=in program="%SYSTEMROOT%UpdateAssistantV2UpdateAssistantCheck.exe" action=block
    netsh advfirewall firewall add rule name="Block_Windows10UpgradeV2" dir=in program="%SYSTEMROOT%UpdateAssistantV2Windows10Upgrade.exe" action=block
    
    echo y|cacls C:WindowsUpdateAssistant*.exe /t /p everyone:n 2>nul
    echo y|cacls C:Windows10Upgrade*.exe /t /p everyone:n 2>nul
    
    net stop wuauserv
    sc config wuauserv start= disabled
    
    schtasks /delete /TN "MicrosoftWindowsUpdateOrchestratorUpdateAssistant" /f 2>nul
    schtasks /delete /TN "MicrosoftWindowsUpdateOrchestratorUpdateAssistantAllUsersRun" /f 2>nul
    schtasks /delete /TN "MicrosoftWindowsUpdateOrchestratorUpdateAssistantCalendarRun" /f 2>nul
    schtasks /delete /TN "MicrosoftWindowsUpdateOrchestratorUpdateAssistantWakeupRun" /f 2>nul
    
    del /q /f %SYSTEMDRIVE%NAU.reg 2>nul
    echo Windows Registry Editor Version 5.00 >> %SYSTEMDRIVE%NAU.reg
    echo.>> %SYSTEMDRIVE%NAU.reg
    echo [HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsWindowsUpdate]>> %SYSTEMDRIVE%NAU.reg
    echo "DoNotConnectToWindowsUpdateInternetLocations"=dword:00000001 >> %SYSTEMDRIVE%NAU.reg
    echo.>> %SYSTEMDRIVE%NAU.reg
    echo [HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsWindowsUpdateAU]>> %SYSTEMDRIVE%NAU.reg
    echo "NoAutoUpdate"=dword:00000001>> %SYSTEMDRIVE%NAU.reg
    REG IMPORT %SYSTEMDRIVE%NAU.reg
    del /q /f %SYSTEMDRIVE%NAU.reg 2>nul
    

    这是一段来自一位国人大神的开源脚本,网上流行了很久了,作者的开源地址是:https://github.com/f1tz/BlockWin10AU

    禁用系统更新后如果需要重新启用系统更新,请手动在Windows服务列表中找到Windows Update服务,启用即可。

    开源矿工https://ntminer.com

  • 相关阅读:
    .Net编程接口中的迭代器(转)
    微软,您的.net为中国程序员带来了什么?(转)
    二进制,八进制,十进制,十六进制转换
    简单实现SQL Server2000数据库缓存
    联合查询
    也谈用反射实现Enum→String映射:一种重视性能的方法 (转)
    javascript事件列表解说(转)
    ASP.NET上传控件
    杂杞
    在.net中生成wml
  • 原文地址:https://www.cnblogs.com/ntminer/p/12155769.html
Copyright © 2011-2022 走看看