feat(WindowsUpdate.DisableAutoRestart): first ver!
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<metadata>
|
||||||
|
<id>WindowsUpdate.DisableAutoRestart</id>
|
||||||
|
<title>Disable Windows Update Auto-Restart</title>
|
||||||
|
<version>0.0.1</version>
|
||||||
|
<authors>Microsoft</authors>
|
||||||
|
<owners>Ethan Brown</owners>
|
||||||
|
<summary>Prevent your system from automatically restarting after automatically installing Windows Updates.</summary>
|
||||||
|
<description>Prevent your system from automatically restarting after automatically installing Windows Updates.
|
||||||
|
|
||||||
|
Sets the registry key HKLM:Software\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoRebootWithLoggedOnUsers to 1
|
||||||
|
|
||||||
|
Alternatively, group policy can be used to set this as well:
|
||||||
|
http://kevinjameshall.wordpress.com/2012/12/26/windows-8-updates-disable-auto-restart/
|
||||||
|
</description>
|
||||||
|
<projectUrl>http://support.microsoft.com/kb/555444</projectUrl>
|
||||||
|
<tags>Windows WindowsUpdate</tags>
|
||||||
|
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
|
||||||
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
|
<iconUrl>https://github.com/Iristyle/ChocolateyPackages/raw/master/WindowsUpdate.DisableAutoRestart/windows8.png</iconUrl>
|
||||||
|
<releaseNotes>
|
||||||
|
</releaseNotes>
|
||||||
|
</metadata>
|
||||||
|
<files>
|
||||||
|
<file src="tools\**" target="tools" />
|
||||||
|
</files>
|
||||||
|
</package>
|
22
WindowsUpdate.DisableAutoRestart/tools/chocolateyInstall.ps1
Normal file
22
WindowsUpdate.DisableAutoRestart/tools/chocolateyInstall.ps1
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
$package = 'WindowsUpdate.DisableAutoRestart'
|
||||||
|
|
||||||
|
try {
|
||||||
|
# http://support.microsoft.com/kb/555444
|
||||||
|
# alternate using GPO: http://kevinjameshall.wordpress.com/2012/12/26/windows-8-updates-disable-auto-restart/
|
||||||
|
$setRegistryKey = @"
|
||||||
|
`$params = @{
|
||||||
|
Path = 'HKLM:Software\Policies\Microsoft\Windows\WindowsUpdate\AU';
|
||||||
|
Name = 'NoAutoRebootWithLoggedOnUsers';
|
||||||
|
Value = 1
|
||||||
|
};
|
||||||
|
if (!(Test-Path `$params.Path)) { New-Item -Path `$params.Path -Force | Out-Null };
|
||||||
|
Set-ItemProperty @params
|
||||||
|
"@
|
||||||
|
|
||||||
|
Start-ChocolateyProcessAsAdmin $setRegistryKey
|
||||||
|
|
||||||
|
Write-ChocolateySuccess $package
|
||||||
|
} catch {
|
||||||
|
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
||||||
|
throw
|
||||||
|
}
|
BIN
WindowsUpdate.DisableAutoRestart/windows8.png
Normal file
BIN
WindowsUpdate.DisableAutoRestart/windows8.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Reference in New Issue
Block a user