Notices: This section not yet converted to new layout. Download stats are rolling back out.

Disable Windows 10 Upgrade Through Windows Update (KB3080351)

1.2.0

Package test results are passing.

This package was approved by moderator ferventcoder on 2/7/2016.

Microsoft is making it harder and harder to prevent this update from hitting your systems. This package applies the Microsoft fixes to prevent the upgrade on Windows 7 and 8.1.
This process is documented at: https://support.microsoft.com/en-us/kb/3080351

Details about Windows 10 Upgrade being changed to a Windows Update "Recommended Update" : http://www.extremetech.com/computing/222326-look-out-microsoft-shifts-windows-10-to-recommended-update-automatic-download

To install Disable Windows 10 Upgrade Through Windows Update (KB3080351), run the following command from the command line or from PowerShell:

C:\> choco install disable-windows10-upgrade

To upgrade Disable Windows 10 Upgrade Through Windows Update (KB3080351), run the following command from the command line or from PowerShell:

C:\> choco upgrade disable-windows10-upgrade

Files

Hide
  • tools\chocolateyInstall.ps1 Show
    $packageName = 'disable-windows10-upgrade'
    $url7 = 'https://download.microsoft.com/download/C/5/3/C530B84C-857A-4296-BB9E-3BB59EEDF555/Windows6.1-KB3065987-v2-x86.msu'
    $checksum7 = '52B432A85AEA3F6CF1BB047D4118A6D4BE9BF5E5'
    $url764 = 'https://download.microsoft.com/download/F/6/7/F678BB18-7D81-4BBA-8FED-6388FF7968AD/Windows6.1-KB3065987-v2-x64.msu'
    $checksum764 = '9CA3A0214B16471E950221F1B0FA83909547144F'
    $url81 = 'https://download.microsoft.com/download/C/4/3/C43C4D83-A249-4026-9A36-1EB796957FA0/Windows8.1-KB3065988-v2-x86.msu'
    $checksum81 = '255083866D636E607B5E9B0B4933B9F0E1D65C1E'
    $url8164 = 'https://download.microsoft.com/download/F/3/D/F3D9A5A4-75A3-47C8-971E-9D0D09AAF9DC/Windows8.1-KB3065988-v2-x64.msu'
    $checksum8164 = 'D6A040EAFF83CC1909C55473C8E208C882AFBF6A'
    $validExitCodes = @(0,3010)
    $toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
    $silentargs = "/quiet /norestart"
    
    #Is It a target verion number (7 thorugh 8.1) and a desktop OS
    $os = (Get-WmiObject "Win32_OperatingSystem")
    If (([version]$os.version -ge [version]"6.3") -AND ([version]$os.version -lt [version]"10.0") -AND ($os.producttype -eq 1))
    {
      $win81 = $True
    }
    If (([version]$os.version -ge [version]"6.1") -AND ([version]$os.version -lt [version]"6.2") -AND ($os.producttype -eq 1))
    {
      $win7 = $True
    }
    
    If (!$win7 -AND !$Win81)
    {
      Write-Warning "Windows 10 Upgrade Through Windows Update is Not Automatically Offered On This Operating System, Nothing to do."
    }
    Else
    {
      If ($Win7)
      {
        If (-not([bool](get-hotfix | where {$_.hotfixId -eq 'KB3065987'})))
        {
          Write-Output "Applying required hotfix KB3065987"
          Install-ChocolateyPackage "$packageName" 'MSU' "$SilentArgs /log:$env:temp\KB3065987.evtx" -url $url7 -url64 $url764 -checksum $checksum7 -checksumtype 'sha1' -checksum64 $checksum764 -checksumtype64 'sha1' -validExitCodes $validExitCodes
          Write-Warning "This update will require a restart before it becomes active..."
        }
      }
      If ($Win81)
      {
        If (-not([bool](get-hotfix | where {$_.hotfixId -eq 'KB3065988'})))
        {
          Write-Output "Applying required hotfix KB3065988"
          Install-ChocolateyPackage "$packageName" 'MSU' "$SilentArgs /log:$env:temp\KB3065987.evtx" -url $url81 -url64 $url8164 -checksum $checksum81 -checksumtype 'sha1' -checksum64 $checksum8164 -checksumtype64 'sha1' -validExitCodes $validExitCodes
          Write-Warning "This update will require a restart before it becomes active..."
        }
      }
    
      $REGKey1 = 'Registry::HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'
      If (!(Test-Path $REGKey1)) {New-Item "$REGKey1" | Out-Null}
      Set-ItemProperty -Path $REGKey1 -Name "DisableOSUpgrade" -Type DWord -Value 1
    
      $REGKey2 = 'Registry::HKLM\Software\Policies\Microsoft\Windows\Gwx'
      If (!(Test-Path $REGKey2)) {New-Item "$REGKey2" | Out-Null}
      Set-ItemProperty -Path $REGKey2 -Name "DisableGwx" -Type DWord -Value 1
    
      Write-Warning "Please check messages above to see if a restart is required."
    
      Write-Output "************************************************************************************"
      Write-Output "*  To reenable Windows 10 Upgrade Through Windows Update, Uninstall This Package   *"
      Write-Output "************************************************************************************"
    }
    
  • tools\chocolateyUninstall.ps1 Show
    $REGKey1 = 'Registry::HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate'
    If (!(Test-Path $REGKey1)) {New-Item "$REGKey1" | Out-Null}
    Set-ItemProperty -Path $REGKey1 -Name "DisableOSUpgrade" -Type DWord -Value 0
    
    $REGKey2 = 'Registry::HKLM\Software\Policies\Microsoft\Windows\Gwx'
    If (!(Test-Path $REGKey2)) {New-Item "$REGKey2" | Out-Null}
    Set-ItemProperty -Path $REGKey2 -Name "DisableGwx" -Type DWord -Value 0
    
    Write-Warning 'Windows 10 upgrade through Windodws Update is now re-enabled.'
    

Virus Scan Results

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Dependencies

This package has no dependencies.

Package Maintainer(s)

Software Author(s)

  • DarwinJS

Tags

Version History

Version Downloads Last updated Status

Discussion for the Disable Windows 10 Upgrade Through Windows Update (KB3080351) Package

Ground rules:

  • This discussion is only about Disable Windows 10 Upgrade Through Windows Update (KB3080351) and the Disable Windows 10 Upgrade Through Windows Update (KB3080351) package. If you have feedback for Chocolatey, please contact the google group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Disable Windows 10 Upgrade Through Windows Update (KB3080351), or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.

comments powered by Disqus
Chocolatey.org uses cookies to enhance the user experience of the site.
Ok