Skip to content

Instantly share code, notes, and snippets.

@riipandi
Created May 26, 2019 19:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riipandi/66425cb4d34c94c8673aff4bbdc37d30 to your computer and use it in GitHub Desktop.
Save riipandi/66425cb4d34c94c8673aff4bbdc37d30 to your computer and use it in GitHub Desktop.

Windows 10 Custmoizer

Download Links

Usage

Preparing image file:

dism /Get-WimInfo /WimFile:d:\winsrc\sources\install.wim
dism /Export-Image /SourceImageFile:d:\winsrc\sources\install.wim /SourceIndex:6 /DestinationImageFile:d:\winsrc\sources\installx.wim /Compress:max

del /f d:\winsrc\sources\install.wim
rename d:\winsrc\sources\installx.wim install.wim

dism /Get-WimInfo /WimFile:d:\winsrc\sources\install.wim /index:1
dism /mount-wim /wimfile:d:\winsrc\sources\install.wim /index:1 /mountdir:d:\windst
dism /get-mountedimageinfo

#dism /remount-wim /mountdir:d:\windst
#dism /image:d:\windst /get-intl

You can delete image file: dism /delete-image /imagefile:d:\winsrc\sources\install.wim /index:1

Enable and disable features

dism /image:d:\windst /Get-Features > fitur.txt

dism /image:d:\windst /enable-feature /featurename:NetFX3 /All /Source:d:\winsrc\sources\sxs /LimitAccess
dism /image:d:\windst /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /All /Source:d:\winsrc\sources\sxs /LimitAccess
dism /image:d:\windst /enable-feature /featurename:Microsoft-Hyper-V-All /All /Source:d:\winsrc\sources\sxs /LimitAccess
dism /image:d:\windst /enable-feature /featurename:HypervisorPlatform /All /Source:d:\winsrc\sources\sxs /LimitAccess
dism /image:d:\windst /enable-feature /featurename:VirtualMachinePlatform /All /Source:d:\winsrc\sources\sxs /LimitAccess
dism /image:d:\windst /enable-feature /featurename:Containers /All /Source:d:\winsrc\sources\sxs /LimitAccess

dism /image:d:\windst /disable-feature /featurename:Internet-Explorer-Optional-amd64 /Remove
dism /image:d:\windst /disable-feature /featurename:Printing-XPSServices-Features /Remove
dism /image:d:\windst /disable-feature /featurename:Xps-Foundation-Xps-Viewer /Remove
dism /image:d:\windst /disable-feature /featurename:FaxServicesClientPackage /Remove
dism /image:d:\windst /disable-feature /featurename:MSRDC-Infrastructure /Remove
dism /image:d:\windst /disable-feature /featurename:WindowsMediaPlayer /Remove
dism /image:d:\windst /disable-feature /featurename:MediaPlayback /Remove

Remove OneDrive

takeown /F d:\windst\Windows\SysWOW64\OneDriveSetup.exe /A && icacls d:\windst\Windows\SysWOW64\OneDriveSetup.exe /grant %username%:F
del d:\windst\Windows\SysWOW64\OneDriveSetup.exe
REG LOAD HKEY_LOCAL_MACHINE\WIM d:\windst\Users\Default\ntuser.dat
REG DELETE "HKEY_LOCAL_MACHINE\WIM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f
REG ADD HKEY_LOCAL_MACHINE\WIM\SOFTWARE\Policies\Microsoft\Windows\CloudContent
REG ADD HKEY_LOCAL_MACHINE\WIM\SOFTWARE\Policies\Microsoft\Windows\CloudContent /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f
REG UNLOAD HKEY_LOCAL_MACHINE\WIM

Add extra fonts

takeown /F "d:\windst\Windows\Fonts" /R /D Y
icacls "d:\windst\Windows\Fonts\*.*" /grant %username%:F

Change Wallpapers

takeown /F "d:\windst\Windows\Web\4K\Wallpaper\Windows" /R /D Y
takeown /F "d:\windst\Windows\Web\Screen" /R /D Y
takeown /F "d:\windst\Windows\Web\Wallpaper\Theme1" /R /D Y
takeown /F "d:\windst\Windows\Web\Wallpaper\Theme2" /R /D Y
takeown /F "d:\windst\Windows\Web\Wallpaper\Windows 10" /R /D Y

icacls "d:\windst\Windows\Web\4K\Wallpaper\Windows\*.*" /grant %username%:F
icacls "d:\windst\Windows\Web\Screen\*.*" /grant %username%:F
icacls "d:\windst\Windows\Web\Wallpaper\Theme1\*.*" /grant %username%:F
icacls "d:\windst\Windows\Web\Wallpaper\Theme2\*.*" /grant %username%:F
icacls "d:\windst\Windows\Web\Wallpaper\Windows\*.*" /grant %username%:F

Slipstream update and drivers

dism /image:d:\windst /add-driver /driver:d:\Downloads\windrv /recurse
dism /image:d:\windst /add-package /packagepath:d:\Downloads\winupd

Remove Windows 10 apps

powershell
dism /image:d:\windst /Get-ProvisionedAppxPackages | Select-String PackageName
dism /image:d:\windst /Remove-ProvisionedAppxPackage /PackageName:xxxxxxxxxxxx

Don't remove this packages:

  • Microsoft.DesktopAppInstaller
  • Microsoft.MicrosoftSolitaireCollection
  • Microsoft.MicrosoftStickyNotes
  • Microsoft.MSPaint_2019
  • Microsoft.Office.OneNote
  • Microsoft.ScreenSketch
  • Microsoft.StorePurchaseApp
  • Microsoft.WindowsCalculator
  • Microsoft.WindowsCamera
  • microsoft.windowscommunicationsapps
  • Microsoft.WindowsStore
  • Microsoft.YourPhone

Commit and unmount

Use /discard or /commit:

dism /unmount-wim /mountdir:d:\windst /commit
dism /cleanup-wim
wimlib\wimoptimize.cmd d:\winsrc\sources\install.wim --recompress

Optional

Remove Test Mode: bcdedit -set TESTSIGNING OFF

Change Product Key

Read: https://www.tenforums.com/tutorials/95922-generic-product-keys-install-windows-10-editions.html

In live system use this command: slmgr /ipk YNMGQ-8RYV3-4PGQ3-C8XTP-7CFBY

W10 Pro      : W269N-WFGWX-YVC9B-4J6C9-T83GX
W10 Pro WS   : NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J
W10 Pro Edu  : YNMGQ-8RYV3-4PGQ3-C8XTP-7CFBY
S16 Standard : WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY
dism /image:d:\windst /Get-TargetEditions
dism /image:d:\windst /set-edition:Education /productkey:YNMGQ-8RYV3-4PGQ3-C8XTP-7CFBY

dism /image:d:\windst /set-edition:ServerStandard /productkey:WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY /accepteula
dism /image:d:\windst /enable-feature /featurename:NetFx3ServerFeatures /All /Source:d:\winsrc\sources\sxs /LimitAccess

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment