Downloads:

567

Downloads of v 1.2.0:

567

Last Update:

2/6/2016

Package Maintainer(s):

Software Author(s):

  • DarwinJS

Tags:

admin disable Windows 10 Automatic Upgrade Update disable-windows10-upgrade

Disable Windows 10 Upgrade Through Windows Update (KB3080351)

1.2.0 | Updated: 2/6/2016

Downloads:

567

Downloads of v 1.2.0:

567

Maintainer(s):

Software Author(s):

  • DarwinJS

Disable Windows 10 Upgrade Through Windows Update (KB3080351) 1.2.0

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

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

>

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

>

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

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade disable-windows10-upgrade -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade disable-windows10-upgrade -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure disable-windows10-upgrade installed
  win_chocolatey:
    name: disable-windows10-upgrade
    state: present
    version: 1.2.0
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'disable-windows10-upgrade' do
  action    :install
  version  '1.2.0'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: disable-windows10-upgrade,
    Version: 1.2.0,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller disable-windows10-upgrade
{
   Name     = 'disable-windows10-upgrade'
   Ensure   = 'Present'
   Version  = '1.2.0'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'disable-windows10-upgrade':
  provider => 'chocolatey',
  ensure   => '1.2.0',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install disable-windows10-upgrade version="1.2.0" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

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

Description

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

tools\chocolateyInstall.ps1
$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

$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.'

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.

Version Downloads Last Updated Status

This package has no dependencies.

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