Ajout de scripts pour modif image wim de windows 10 1703

This commit is contained in:
andre 2018-02-01 16:51:26 +01:00
parent a54af590cb
commit 7f968a7150
3 changed files with 61 additions and 0 deletions

40
Windows10/ADDReg1703.ps1 Normal file
View File

@ -0,0 +1,40 @@
$WimFile = "D:\TEMP\Windows10_1703\sources\install.wim"
$MountPath = D:\TEMP\Mount
Mount-WindowsImage -ImagePath $WimFile -Index 1 -Path $MountPath
#region Customise Default User Profile
Write-Output -InputObject "`nCustomising the default user profile...`n"
REG LOAD "HKLM\_USER" "$MountPath\Users\Default\NTUSER.DAT" | Out-Null
REG LOAD "HKLM\_SOFTWARE" "$MountPath\Windows\System32\config\SOFTWARE" | Out-Null
# HKCU
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SystemPaneSuggestionsEnabled /d 0 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v PreInstalledAppsEnabled /d 0 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v OemPreInstalledAppsEnabled /d 0 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v DisableThumbnailCache /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v LaunchTo /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /d 0 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled /d 0 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Search" /v SearchboxTaskbarMode /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions" /v NoHelpItemSendFeedback /d 1 /t REG_DWORD /f
& REG DELETE "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f
# HKLM
# & REG ADD "HKLM\_SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v VerboseStatus /d 1 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Internet Explorer\Main" /v DisableAddSiteMode /d 1 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\MRT" /v DontOfferThroughWUAU /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableSoftLanding /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\WindowsStore" /v AutoDownload /d 2 /t REG_DWORD /f
& REG ADD "HKLM\_SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /v AutoDownload /d 2 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\Personalization" /v NoLockscreen /d 1 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting" /v Disabled /d 1 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowSearchToUseLocation /d 0 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v ConnectedSearchUseWeb /d 0 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v DisableWebSearch /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoRebootWithLoggedOnUsers /d 1 /t REG_DWORD /f
REG UNLOAD "HKLM\_USER" | Out-Null
REG UNLOAD "HKLM\_SOFTWARE" | Out-Null
Dismount-WindowsImage -Path $MountPath -Save

View File

@ -0,0 +1,8 @@
$UpdatesPath = "D:\TEMP\Update\*"
$MountPath = D:\TEMP\Mount\
$WimFile = D:\TEMP\Windows10_1703\sources\install.wim
DISM /Mount-Wim /WimFile:$WimFile /index:1 /Mountdir:$MountPath
DISM /image:$MountPath /enable-feature /featurename:NetFx3 /all /limitaccess /source:F:\sources\sxs
Write-Host "Updates Applied to WIM"
DISM /Unmount-Wim /Mountdir:$MountPath /commit
DISM /Cleanup-Wim

View File

@ -0,0 +1,13 @@
$UpdatesPath = "D:\TEMP\Update\*"
$MountPath = D:\TEMP\Mount\
$WimFile = D:\TEMP\Windows10_1703\sources\install.wim
DISM /Mount-Wim /WimFile:$WimFile /index:1 /Mountdir:$MountPath
$UpdateArray = Get-Item $UpdatesPath
ForEach ($Updates in $UpdateArray)
{
DISM /image:$MountPath /Add-Package /Packagepath:$Updates
Start-Sleep s 10
}
Write-Host "Updates Applied to WIM"
DISM /Unmount-Wim /Mountdir:$MountPath /commit
DISM /Cleanup-Wim