<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
	<!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=es-ES&Locale=es-ES&Keyboard=0000040a&GeoLocation=217&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&HidePowerShellWindows=true&ComputerNameMode=Random&CompactOsMode=Never&TimeZoneMode=Implicit&PartitionMode=Interactive&DiskAssertionMode=Skip&WindowsEditionMode=Generic&WindowsEdition=home&InstallFromMode=Automatic&PEMode=Default&UserAccountMode=Unattended&AccountName0=Usuario&AccountDisplayName0=&AccountPassword0=&AccountGroup0=Administrators&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&ShowFileExtensions=true&ClassicContextMenu=true&LaunchToThisPC=true&ShowEndTask=true&TaskbarSearch=Icon&TaskbarIconsMode=Default&DisableWidgets=true&StartTilesMode=Default&StartPinsMode=Empty&EnableLongPaths=true&AllowPowerShellScripts=true&DisableLastAccess=true&TurnOffSystemSounds=true&DisableAppSuggestions=true&HideEdgeFre=true&DisableEdgeStartupBoost=true&DisableCoreIsolation=true&DeleteWindowsOld=true&EffectsMode=Performance&DeleteEdgeDesktopIcon=true&DesktopIconsMode=Default&StartFoldersMode=Default&WifiMode=Skip&ExpressSettings=DisableAll&LockKeysMode=Skip&StickyKeysMode=Disabled&ColorMode=Default&WallpaperMode=Default&LockScreenMode=Default&Remove3DViewer=true&RemoveBingSearch=true&RemoveClipchamp=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveWindowsHello=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGameAssist=true&RemoveGetHelp=true&RemoveHandwriting=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveMediaFeatures=true&RemoveMixedReality=true&RemoveZuneVideo=true&RemoveNews=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOneSync=true&RemoveOpenSSHClient=true&RemoveOutlook=true&RemovePaint3D=true&RemovePeople=true&RemovePhotos=true&RemovePowerAutomate=true&RemovePowerShellISE=true&RemoveQuickAssist=true&RemoveRecall=true&RemoveRdpClient=true&RemoveSkype=true&RemoveSnippingTool=true&RemoveSolitaire=true&RemoveSpeech=true&RemoveStepsRecorder=true&RemoveStickyNotes=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWallet=true&RemoveWeather=true&RemoveFaxAndScan=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveWindowsTerminal=true&RemoveWordPad=true&RemoveXboxApps=true&RemoveYourPhone=true&FirstLogonScript0=%23+unattend-debloat-regonly.ps1%0D%0A%23+SOLO+registro.+Sin+switches%2C+sin+men%C3%BAs.%0D%0A%23+Robusto+para+FirstLogon+%2F+autounattend.%0D%0A%23Requires+-RunAsAdministrator%0D%0A%0D%0ASet-StrictMode+-Version+Latest%0D%0A%24ErrorActionPreference+%3D+%22Continue%22%0D%0A%0D%0A%24LogPath+%3D+Join-Path+%24PSScriptRoot+%22Debloat-REG-Only.log%22%0D%0Atry+%7B+Start-Transcript+-Path+%24LogPath+-Append+-Force+%7C+Out-Null+%7D+catch+%7B%7D%0D%0A%0D%0Afunction+OK%28%24m%29%7B+Write-Host+%22%5BOK%5D+++%24m%22+-ForegroundColor+Green+%7D%0D%0Afunction+FAIL%28%24m%29%7B+Write-Host+%22%5BFAIL%5D+%24m%22+-ForegroundColor+Red+%7D%0D%0Afunction+WARN%28%24m%29%7B+Write-Host+%22%5BWARN%5D+%24m%22+-ForegroundColor+Yellow+%7D%0D%0A%0D%0A%23+%2D%2D-+Helpers+para+REG+%28sin+depender+de+PS+drives%29+%2D%2D-%0D%0Afunction+RegAddDword%28%5Bstring%5D%24Key%2C%5Bstring%5D%24Name%2C%5Bint%5D%24Value%29%7B%0D%0A++%24cmd+%3D+%22reg.exe+ADD+%60%22%24Key%60%22+%2Fv+%60%22%24Name%60%22+%2Ft+REG_DWORD+%2Fd+%24Value+%2Ff%22%0D%0A++%24p+%3D+Start-Process+-FilePath+%22cmd.exe%22+-ArgumentList+%22%2Fc+%24cmd%22+-Wait+-PassThru+-WindowStyle+Hidden%0D%0A++if+%28%24p.ExitCode+-eq+0%29+%7B+OK+%22%24Key%5C%24Name+%3D+%24Value%22+%7D+else+%7B+FAIL+%22%24Key%5C%24Name+%28ExitCode+%24%28%24p.ExitCode%29%29%22+%7D%0D%0A%7D%0D%0A%0D%0Afunction+RegAddSz%28%5Bstring%5D%24Key%2C%5Bstring%5D%24Name%2C%5Bstring%5D%24Value%29%7B%0D%0A++%24cmd+%3D+%22reg.exe+ADD+%60%22%24Key%60%22+%2Fv+%60%22%24Name%60%22+%2Ft+REG_SZ+%2Fd+%60%22%24Value%60%22+%2Ff%22%0D%0A++%24p+%3D+Start-Process+-FilePath+%22cmd.exe%22+-ArgumentList+%22%2Fc+%24cmd%22+-Wait+-PassThru+-WindowStyle+Hidden%0D%0A++if+%28%24p.ExitCode+-eq+0%29+%7B+OK+%22%24Key%5C%24Name+%3D+%24Value%22+%7D+else+%7B+FAIL+%22%24Key%5C%24Name+%28ExitCode+%24%28%24p.ExitCode%29%29%22+%7D%0D%0A%7D%0D%0A%0D%0Afunction+LoadDefaultHive+%7B%0D%0A++%24ntUser+%3D+%22%24env%3ASystemDrive%5CUsers%5CDefault%5CNTUSER.DAT%22%0D%0A++if+%28-not+%28Test-Path+%24ntUser%29%29+%7B+WARN+%22No+existe+%24ntUser%22%3B+return+%24false+%7D%0D%0A%0D%0A++%23+unload+best-effort+%28si+no+est%C3%A1+cargado%2C+puede+devolver+error+%3D%3E+lo+ignoramos%29%0D%0A++Start-Process+-FilePath+%22cmd.exe%22+-ArgumentList+%22%2Fc+reg.exe+UNLOAD+HKU%5CDefUser%22+-Wait+-WindowStyle+Hidden+%7C+Out-Null%0D%0A%0D%0A++%24p+%3D+Start-Process+-FilePath+%22cmd.exe%22+-ArgumentList+%22%2Fc+reg.exe+LOAD+HKU%5CDefUser+%60%22%24ntUser%60%22%22+-Wait+-PassThru+-WindowStyle+Hidden%0D%0A++if+%28%24p.ExitCode+-eq+0%29+%7B+OK+%22Default+User+hive+cargado%3A+HKU%5CDefUser%22%3B+return+%24true+%7D%0D%0A++WARN+%22No+se+pudo+cargar+Default+User+hive+%28ExitCode+%24%28%24p.ExitCode%29%29%22%0D%0A++return+%24false%0D%0A%7D%0D%0A%0D%0Afunction+UnloadDefaultHive+%7B%0D%0A++%24p+%3D+Start-Process+-FilePath+%22cmd.exe%22+-ArgumentList+%22%2Fc+reg.exe+UNLOAD+HKU%5CDefUser%22+-Wait+-PassThru+-WindowStyle+Hidden%0D%0A++if+%28%24p.ExitCode+-eq+0%29+%7B+OK+%22Default+User+hive+descargado%22+%7D+else+%7B+WARN+%22No+se+pudo+descargar+HKU%5CDefUser+%28ExitCode+%24%28%24p.ExitCode%29%29%22+%7D%0D%0A%7D%0D%0A%0D%0Afunction+ApplySystemTweaks+%7B%0D%0A++%23+%2D%2D-+HKLM+%2D%2D-%0D%0A++RegAddDword+%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%5CCloudContent%22+%22DisableWindowsConsumerFeatures%22+1%0D%0A%0D%0A++RegAddDword+%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%5CDataCollection%22+%22AllowTelemetry%22+0%0D%0A++RegAddDword+%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%5CDataCollection%22+%22DoNotShowFeedbackNotifications%22+1%0D%0A++RegAddDword+%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%5CAdvertisingInfo%22+%22DisabledByGroupPolicy%22+1%0D%0A%0D%0A++RegAddDword+%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%5CSystem%22+%22EnableActivityFeed%22+0%0D%0A++RegAddDword+%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%5CSystem%22+%22PublishUserActivities%22+0%0D%0A++RegAddDword+%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%5CSystem%22+%22UploadUserActivities%22+0%0D%0A%0D%0A++RegAddSz+++%22HKLM%5CSOFTWARE%5CMicrosoft%5CWindows%5CCurrentVersion%5CCapabilityAccessManager%5CConsentStore%5Clocation%22+%22Value%22+%22Deny%22%0D%0A++RegAddDword+%22HKLM%5CSYSTEM%5CMaps%22+%22AutoUpdateEnabled%22+0%0D%0A%0D%0A++RegAddDword+%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%5CGameDVR%22+%22AllowGameDVR%22+0%0D%0A++RegAddDword+%22HKLM%5CSOFTWARE%5CPolicies%5CMicrosoft%5CWindows%5CDeliveryOptimization%22+%22DODownloadMode%22+0%0D%0A++RegAddDword+%22HKLM%5CSYSTEM%5CCurrentControlSet%5CControl%5CRemote+Assistance%22+%22fAllowToGetHelp%22+0%0D%0A++RegAddDword+%22HKLM%5CSYSTEM%5CCurrentControlSet%5CControl%5CFileSystem%22+%22LongPathsEnabled%22+1%0D%0A%7D%0D%0A%0D%0Afunction+ApplyUserTweaksToHive%28%5Bstring%5D%24HiveRoot%29%7B%0D%0A++%23+HiveRoot%3A+%22HKCU%22+o+%22HKU%5CDefUser%22%0D%0A%0D%0A++%23+ContentDelivery+%2F+suggestions+OFF%0D%0A++%24cdm+%3D+%22%24HiveRoot%5CSOFTWARE%5CMicrosoft%5CWindows%5CCurrentVersion%5CContentDeliveryManager%22%0D%0A++RegAddDword+%24cdm+%22SystemPaneSuggestionsEnabled%22+0%0D%0A++RegAddDword+%24cdm+%22SubscribedContent-338389Enabled%22+0%0D%0A++RegAddDword+%24cdm+%22SubscribedContent-353698Enabled%22+0%0D%0A++RegAddDword+%24cdm+%22SubscribedContent-338388Enabled%22+0%0D%0A++RegAddDword+%24cdm+%22SubscribedContent-338387Enabled%22+0%0D%0A++RegAddDword+%24cdm+%22SilentInstalledAppsEnabled%22+0%0D%0A++RegAddDword+%24cdm+%22PreInstalledAppsEnabled%22+0%0D%0A++RegAddDword+%24cdm+%22OemPreInstalledAppsEnabled%22+0%0D%0A++RegAddDword+%24cdm+%22ContentDeliveryAllowed%22+0%0D%0A%0D%0A++%23+Scoobe+off%0D%0A++RegAddDword+%22%24HiveRoot%5CSOFTWARE%5CMicrosoft%5CWindows%5CCurrentVersion%5CUserProfileEngagement%22+%22ScoobeSystemSettingEnabled%22+0%0D%0A%0D%0A++%23+Explorer+tweaks%0D%0A++%24adv+%3D+%22%24HiveRoot%5CSOFTWARE%5CMicrosoft%5CWindows%5CCurrentVersion%5CExplorer%5CAdvanced%22%0D%0A++RegAddDword+%24adv+%22PeopleBand%22+0%0D%0A++RegAddDword+%24adv+%22LaunchTo%22+1%0D%0A%0D%0A++%23+Widgets+%28TaskbarDa%29+%2B+Align+left+%28TaskbarAl%29%0D%0A++RegAddDword+%24adv+%22TaskbarDa%22+0%0D%0A++RegAddDword+%24adv+%22TaskbarAl%22+0%0D%0A%0D%0A++%23+Meet+Now+hidden%0D%0A++RegAddDword+%22%24HiveRoot%5CSOFTWARE%5CMicrosoft%5CWindows%5CCurrentVersion%5CPolicies%5CExplorer%22+%22HideSCAMeetNow%22+1%0D%0A%0D%0A++%23+Bing+search+%28si+aplica%29%0D%0A++RegAddDword+%22%24HiveRoot%5CSOFTWARE%5CMicrosoft%5CWindows%5CCurrentVersion%5CSearch%22+%22BingSearchEnabled%22+0%0D%0A%0D%0A++%23+GameDVR%0D%0A++RegAddDword+%22%24HiveRoot%5CSystem%5CGameConfigStore%22+%22GameDVR_Enabled%22+0%0D%0A%0D%0A++%23+AutoEndTasks%0D%0A++RegAddSz+%22%24HiveRoot%5CControl+Panel%5CDesktop%22+%22AutoEndTasks%22+%221%22%0D%0A%7D%0D%0A%0D%0AWrite-Host+%22%3D%3D%3D+Debloat+REGISTRY+ONLY+%3D%3D%3D%22%0D%0AWrite-Host+%22Log%3A+%24LogPath%22%0D%0AWrite-Host+%22%22%0D%0A%0D%0AWrite-Host+%22%3D%3D+HKLM+%28system%29+%3D%3D%22%0D%0AApplySystemTweaks%0D%0A%0D%0AWrite-Host+%22%22%0D%0AWrite-Host+%22%3D%3D+HKCU+%28usuario+actual%29+%3D%3D%22%0D%0AApplyUserTweaksToHive+%22HKCU%22%0D%0A%0D%0AWrite-Host+%22%22%0D%0AWrite-Host+%22%3D%3D+Default+User+%28futuros+perfiles%29+%3D%3D%22%0D%0Aif+%28LoadDefaultHive%29+%7B%0D%0A++try+%7B+ApplyUserTweaksToHive+%22HKU%5CDefUser%22+%7D+finally+%7B+UnloadDefaultHive+%7D%0D%0A%7D%0D%0A%0D%0AWrite-Host+%22%22%0D%0AWrite-Host+%22DONE.+Reboot+recomendado.%22%0D%0A%0D%0Atry+%7B+Stop-Transcript+%7C+Out-Null+%7D+catch+%7B%7D%0D%0A&FirstLogonScriptType0=Ps1&WdacMode=Skip&AppLockerMode=Skip-->
	<settings pass="offlineServicing"></settings>
	<settings pass="windowsPE">
		<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
			<UILanguage>es-ES</UILanguage>
		</component>
		<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
			<ImageInstall>
				<OSImage>
					<Compact>false</Compact>
				</OSImage>
			</ImageInstall>
			<UserData>
				<ProductKey>
					<Key>YTMG3-N6DKC-DKB77-7M9GH-8HVX7</Key>
					<WillShowUI>OnError</WillShowUI>
				</ProductKey>
				<AcceptEula>true</AcceptEula>
			</UserData>
			<UseConfigurationSet>false</UseConfigurationSet>
			<RunSynchronous>
				<RunSynchronousCommand wcm:action="add">
					<Order>1</Order>
					<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path>
				</RunSynchronousCommand>
				<RunSynchronousCommand wcm:action="add">
					<Order>2</Order>
					<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path>
				</RunSynchronousCommand>
				<RunSynchronousCommand wcm:action="add">
					<Order>3</Order>
					<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path>
				</RunSynchronousCommand>
			</RunSynchronous>
		</component>
	</settings>
	<settings pass="generalize"></settings>
	<settings pass="specialize">
		<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
			<RunSynchronous>
				<RunSynchronousCommand wcm:action="add">
					<Order>1</Order>
					<Path>powershell.exe -WindowStyle "Hidden" -NoProfile -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;"</Path>
				</RunSynchronousCommand>
				<RunSynchronousCommand wcm:action="add">
					<Order>2</Order>
					<Path>powershell.exe -WindowStyle "Hidden" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\Specialize.ps1"</Path>
				</RunSynchronousCommand>
				<RunSynchronousCommand wcm:action="add">
					<Order>3</Order>
					<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
				</RunSynchronousCommand>
				<RunSynchronousCommand wcm:action="add">
					<Order>4</Order>
					<Path>powershell.exe -WindowStyle "Hidden" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\DefaultUser.ps1"</Path>
				</RunSynchronousCommand>
				<RunSynchronousCommand wcm:action="add">
					<Order>5</Order>
					<Path>reg.exe unload "HKU\DefaultUser"</Path>
				</RunSynchronousCommand>
			</RunSynchronous>
		</component>
	</settings>
	<settings pass="auditSystem"></settings>
	<settings pass="auditUser"></settings>
	<settings pass="oobeSystem">
		<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
			<InputLocale>0c0a:0000040a</InputLocale>
			<SystemLocale>es-ES</SystemLocale>
			<UILanguage>es-ES</UILanguage>
			<UserLocale>es-ES</UserLocale>
		</component>
		<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
			<UserAccounts>
				<LocalAccounts>
					<LocalAccount wcm:action="add">
						<Name>Usuario</Name>
						<DisplayName></DisplayName>
						<Group>Administrators</Group>
						<Password>
							<Value></Value>
							<PlainText>true</PlainText>
						</Password>
					</LocalAccount>
				</LocalAccounts>
			</UserAccounts>
			<AutoLogon>
				<Username>Usuario</Username>
				<Enabled>true</Enabled>
				<LogonCount>1</LogonCount>
				<Password>
					<Value></Value>
					<PlainText>true</PlainText>
				</Password>
			</AutoLogon>
			<OOBE>
				<ProtectYourPC>3</ProtectYourPC>
				<HideEULAPage>true</HideEULAPage>
				<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
				<HideOnlineAccountScreens>false</HideOnlineAccountScreens>
			</OOBE>
			<FirstLogonCommands>
				<SynchronousCommand wcm:action="add">
					<Order>1</Order>
					<CommandLine>powershell.exe -WindowStyle "Hidden" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\FirstLogon.ps1"</CommandLine>
				</SynchronousCommand>
			</FirstLogonCommands>
		</component>
	</settings>
	<Extensions xmlns="https://schneegans.de/windows/unattend-generator/">
		<ExtractScript>
param(
    [xml] $Document
);

foreach( $file in $Document.unattend.Extensions.File ) {
    $path = [System.Environment]::ExpandEnvironmentVariables( $file.GetAttribute( 'path' ) );
    mkdir -Path( $path | Split-Path -Parent ) -ErrorAction 'SilentlyContinue';
    $encoding = switch( [System.IO.Path]::GetExtension( $path ) ) {
        { $_ -in '.ps1', '.xml' } { [System.Text.Encoding]::UTF8; }
        { $_ -in '.reg', '.vbs', '.js' } { [System.Text.UnicodeEncoding]::new( $false, $true ); }
        default { [System.Text.Encoding]::Default; }
    };
    $bytes = $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() );
    [System.IO.File]::WriteAllBytes( $path, $bytes );
}
		</ExtractScript>
		<File path="C:\Windows\Setup\Scripts\RemovePackages.ps1">
$selectors = @(
	'Microsoft.Microsoft3DViewer';
	'Microsoft.BingSearch';
	'Clipchamp.Clipchamp';
	'Microsoft.Copilot';
	'Microsoft.549981C3F5F10';
	'Microsoft.Windows.DevHome';
	'MicrosoftCorporationII.MicrosoftFamily';
	'Microsoft.WindowsFeedbackHub';
	'Microsoft.Edge.GameAssist';
	'Microsoft.GetHelp';
	'Microsoft.Getstarted';
	'microsoft.windowscommunicationsapps';
	'Microsoft.WindowsMaps';
	'Microsoft.MixedReality.Portal';
	'Microsoft.BingNews';
	'Microsoft.MicrosoftOfficeHub';
	'Microsoft.Office.OneNote';
	'Microsoft.OutlookForWindows';
	'Microsoft.MSPaint';
	'Microsoft.People';
	'Microsoft.Windows.Photos';
	'Microsoft.PowerAutomateDesktop';
	'MicrosoftCorporationII.QuickAssist';
	'Microsoft.SkypeApp';
	'Microsoft.ScreenSketch';
	'Microsoft.MicrosoftSolitaireCollection';
	'Microsoft.MicrosoftStickyNotes';
	'MicrosoftTeams';
	'MSTeams';
	'Microsoft.Todos';
	'Microsoft.WindowsSoundRecorder';
	'Microsoft.Wallet';
	'Microsoft.BingWeather';
	'Microsoft.WindowsTerminal';
	'Microsoft.Xbox.TCUI';
	'Microsoft.XboxApp';
	'Microsoft.XboxGameOverlay';
	'Microsoft.XboxGamingOverlay';
	'Microsoft.XboxIdentityProvider';
	'Microsoft.XboxSpeechToTextOverlay';
	'Microsoft.GamingApp';
	'Microsoft.YourPhone';
	'Microsoft.ZuneMusic';
	'Microsoft.ZuneVideo';
);
$getCommand = {
  Get-AppxProvisionedPackage -Online;
};
$filterCommand = {
  $_.DisplayName -eq $selector;
};
$removeCommand = {
  [CmdletBinding()]
  param(
    [Parameter( Mandatory, ValueFromPipeline )]
    $InputObject
  );
  process {
    $InputObject | Remove-AppxProvisionedPackage -AllUsers -Online -ErrorAction 'Continue';
  }
};
$type = 'Package';
$logfile = 'C:\Windows\Setup\Scripts\RemovePackages.log';
&amp; {
	$installed = &amp; $getCommand;
	foreach( $selector in $selectors ) {
		$result = [ordered] @{
			Selector = $selector;
		};
		$found = $installed | Where-Object -FilterScript $filterCommand;
		if( $found ) {
			$result.Output = $found | &amp; $removeCommand;
			if( $? ) {
				$result.Message = "$type removed.";
			} else {
				$result.Message = "$type not removed.";
				$result.Error = $Error[0];
			}
		} else {
			$result.Message = "$type not installed.";
		}
		$result | ConvertTo-Json -Depth 3 -Compress;
	}
} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; $logfile;
		</File>
		<File path="C:\Windows\Setup\Scripts\RemoveCapabilities.ps1">
$selectors = @(
	'Print.Fax.Scan';
	'Language.Handwriting';
	'Browser.InternetExplorer';
	'MathRecognizer';
	'OneCoreUAP.OneSync';
	'OpenSSH.Client';
	'Microsoft.Windows.PowerShell.ISE';
	'App.Support.QuickAssist';
	'Microsoft.Windows.SnippingTool';
	'Language.Speech';
	'Language.TextToSpeech';
	'App.StepsRecorder';
	'Hello.Face.18967';
	'Hello.Face.Migration.18967';
	'Hello.Face.20134';
	'Media.WindowsMediaPlayer';
	'Microsoft.Windows.WordPad';
);
$getCommand = {
  Get-WindowsCapability -Online | Where-Object -Property 'State' -NotIn -Value @(
    'NotPresent';
    'Removed';
  );
};
$filterCommand = {
  ($_.Name -split '~')[0] -eq $selector;
};
$removeCommand = {
  [CmdletBinding()]
  param(
    [Parameter( Mandatory, ValueFromPipeline )]
    $InputObject
  );
  process {
    $InputObject | Remove-WindowsCapability -Online -ErrorAction 'Continue';
  }
};
$type = 'Capability';
$logfile = 'C:\Windows\Setup\Scripts\RemoveCapabilities.log';
&amp; {
	$installed = &amp; $getCommand;
	foreach( $selector in $selectors ) {
		$result = [ordered] @{
			Selector = $selector;
		};
		$found = $installed | Where-Object -FilterScript $filterCommand;
		if( $found ) {
			$result.Output = $found | &amp; $removeCommand;
			if( $? ) {
				$result.Message = "$type removed.";
			} else {
				$result.Message = "$type not removed.";
				$result.Error = $Error[0];
			}
		} else {
			$result.Message = "$type not installed.";
		}
		$result | ConvertTo-Json -Depth 3 -Compress;
	}
} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; $logfile;
		</File>
		<File path="C:\Windows\Setup\Scripts\RemoveFeatures.ps1">
$selectors = @(
	'MediaPlayback';
	'Microsoft-RemoteDesktopConnection';
	'Recall';
	'Microsoft-SnippingTool';
);
$getCommand = {
  Get-WindowsOptionalFeature -Online | Where-Object -Property 'State' -NotIn -Value @(
    'Disabled';
    'DisabledWithPayloadRemoved';
  );
};
$filterCommand = {
  $_.FeatureName -eq $selector;
};
$removeCommand = {
  [CmdletBinding()]
  param(
    [Parameter( Mandatory, ValueFromPipeline )]
    $InputObject
  );
  process {
    $InputObject | Disable-WindowsOptionalFeature -Online -Remove -NoRestart -ErrorAction 'Continue';
  }
};
$type = 'Feature';
$logfile = 'C:\Windows\Setup\Scripts\RemoveFeatures.log';
&amp; {
	$installed = &amp; $getCommand;
	foreach( $selector in $selectors ) {
		$result = [ordered] @{
			Selector = $selector;
		};
		$found = $installed | Where-Object -FilterScript $filterCommand;
		if( $found ) {
			$result.Output = $found | &amp; $removeCommand;
			if( $? ) {
				$result.Message = "$type removed.";
			} else {
				$result.Message = "$type not removed.";
				$result.Error = $Error[0];
			}
		} else {
			$result.Message = "$type not installed.";
		}
		$result | ConvertTo-Json -Depth 3 -Compress;
	}
} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; $logfile;
		</File>
		<File path="C:\Windows\Setup\Scripts\TurnOffSystemSounds.ps1">
$excludes = Get-ChildItem -LiteralPath 'Registry::HKU\DefaultUser\AppEvents\EventLabels' |
    Where-Object -FilterScript { ($_ | Get-ItemProperty).ExcludeFromCPL -eq 1; } |
    Select-Object -ExpandProperty 'PSChildName';
Get-ChildItem -Path 'Registry::HKU\DefaultUser\AppEvents\Schemes\Apps\*\*' |
    Where-Object -Property 'PSChildName' -NotIn $excludes |
    Get-ChildItem -Include '.Current' | Set-ItemProperty -Name '(Default)' -Value '';
		</File>
		<File path="C:\Windows\Setup\Scripts\SetStartPins.ps1">
$json = '{"pinnedList":[]}';
if( [System.Environment]::OSVersion.Version.Build -lt 20000 ) {
	return;
}
$key = 'Registry::HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start';
New-Item -Path $key -ItemType 'Directory' -ErrorAction 'SilentlyContinue';
Set-ItemProperty -LiteralPath $key -Name 'ConfigureStartPins' -Value $json -Type 'String';
		</File>
		<File path="C:\Windows\Setup\Scripts\unattend-01.ps1">
# unattend-debloat-regonly.ps1
# SOLO registro. Sin switches, sin men&#xFA;s.
# Robusto para FirstLogon / autounattend.
#Requires -RunAsAdministrator

Set-StrictMode -Version Latest
$ErrorActionPreference = "Continue"

$LogPath = Join-Path $PSScriptRoot "Debloat-REG-Only.log"
try { Start-Transcript -Path $LogPath -Append -Force | Out-Null } catch {}

function OK($m){ Write-Host "[OK]   $m" -ForegroundColor Green }
function FAIL($m){ Write-Host "[FAIL] $m" -ForegroundColor Red }
function WARN($m){ Write-Host "[WARN] $m" -ForegroundColor Yellow }

# --- Helpers para REG (sin depender de PS drives) ---
function RegAddDword([string]$Key,[string]$Name,[int]$Value){
  $cmd = "reg.exe ADD `"$Key`" /v `"$Name`" /t REG_DWORD /d $Value /f"
  $p = Start-Process -FilePath "cmd.exe" -ArgumentList "/c $cmd" -Wait -PassThru -WindowStyle Hidden
  if ($p.ExitCode -eq 0) { OK "$Key\$Name = $Value" } else { FAIL "$Key\$Name (ExitCode $($p.ExitCode))" }
}

function RegAddSz([string]$Key,[string]$Name,[string]$Value){
  $cmd = "reg.exe ADD `"$Key`" /v `"$Name`" /t REG_SZ /d `"$Value`" /f"
  $p = Start-Process -FilePath "cmd.exe" -ArgumentList "/c $cmd" -Wait -PassThru -WindowStyle Hidden
  if ($p.ExitCode -eq 0) { OK "$Key\$Name = $Value" } else { FAIL "$Key\$Name (ExitCode $($p.ExitCode))" }
}

function LoadDefaultHive {
  $ntUser = "$env:SystemDrive\Users\Default\NTUSER.DAT"
  if (-not (Test-Path $ntUser)) { WARN "No existe $ntUser"; return $false }

  # unload best-effort (si no est&#xE1; cargado, puede devolver error =&gt; lo ignoramos)
  Start-Process -FilePath "cmd.exe" -ArgumentList "/c reg.exe UNLOAD HKU\DefUser" -Wait -WindowStyle Hidden | Out-Null

  $p = Start-Process -FilePath "cmd.exe" -ArgumentList "/c reg.exe LOAD HKU\DefUser `"$ntUser`"" -Wait -PassThru -WindowStyle Hidden
  if ($p.ExitCode -eq 0) { OK "Default User hive cargado: HKU\DefUser"; return $true }
  WARN "No se pudo cargar Default User hive (ExitCode $($p.ExitCode))"
  return $false
}

function UnloadDefaultHive {
  $p = Start-Process -FilePath "cmd.exe" -ArgumentList "/c reg.exe UNLOAD HKU\DefUser" -Wait -PassThru -WindowStyle Hidden
  if ($p.ExitCode -eq 0) { OK "Default User hive descargado" } else { WARN "No se pudo descargar HKU\DefUser (ExitCode $($p.ExitCode))" }
}

function ApplySystemTweaks {
  # --- HKLM ---
  RegAddDword "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" "DisableWindowsConsumerFeatures" 1

  RegAddDword "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "AllowTelemetry" 0
  RegAddDword "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "DoNotShowFeedbackNotifications" 1
  RegAddDword "HKLM\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" "DisabledByGroupPolicy" 1

  RegAddDword "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" "EnableActivityFeed" 0
  RegAddDword "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" "PublishUserActivities" 0
  RegAddDword "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" "UploadUserActivities" 0

  RegAddSz   "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" "Value" "Deny"
  RegAddDword "HKLM\SYSTEM\Maps" "AutoUpdateEnabled" 0

  RegAddDword "HKLM\SOFTWARE\Policies\Microsoft\Windows\GameDVR" "AllowGameDVR" 0
  RegAddDword "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" "DODownloadMode" 0
  RegAddDword "HKLM\SYSTEM\CurrentControlSet\Control\Remote Assistance" "fAllowToGetHelp" 0
  RegAddDword "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" "LongPathsEnabled" 1
}

function ApplyUserTweaksToHive([string]$HiveRoot){
  # HiveRoot: "HKCU" o "HKU\DefUser"

  # ContentDelivery / suggestions OFF
  $cdm = "$HiveRoot\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
  RegAddDword $cdm "SystemPaneSuggestionsEnabled" 0
  RegAddDword $cdm "SubscribedContent-338389Enabled" 0
  RegAddDword $cdm "SubscribedContent-353698Enabled" 0
  RegAddDword $cdm "SubscribedContent-338388Enabled" 0
  RegAddDword $cdm "SubscribedContent-338387Enabled" 0
  RegAddDword $cdm "SilentInstalledAppsEnabled" 0
  RegAddDword $cdm "PreInstalledAppsEnabled" 0
  RegAddDword $cdm "OemPreInstalledAppsEnabled" 0
  RegAddDword $cdm "ContentDeliveryAllowed" 0

  # Scoobe off
  RegAddDword "$HiveRoot\SOFTWARE\Microsoft\Windows\CurrentVersion\UserProfileEngagement" "ScoobeSystemSettingEnabled" 0

  # Explorer tweaks
  $adv = "$HiveRoot\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
  RegAddDword $adv "PeopleBand" 0
  RegAddDword $adv "LaunchTo" 1

  # Widgets (TaskbarDa) + Align left (TaskbarAl)
  RegAddDword $adv "TaskbarDa" 0
  RegAddDword $adv "TaskbarAl" 0

  # Meet Now hidden
  RegAddDword "$HiveRoot\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" "HideSCAMeetNow" 1

  # Bing search (si aplica)
  RegAddDword "$HiveRoot\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" "BingSearchEnabled" 0

  # GameDVR
  RegAddDword "$HiveRoot\System\GameConfigStore" "GameDVR_Enabled" 0

  # AutoEndTasks
  RegAddSz "$HiveRoot\Control Panel\Desktop" "AutoEndTasks" "1"
}

Write-Host "=== Debloat REGISTRY ONLY ==="
Write-Host "Log: $LogPath"
Write-Host ""

Write-Host "== HKLM (system) =="
ApplySystemTweaks

Write-Host ""
Write-Host "== HKCU (usuario actual) =="
ApplyUserTweaksToHive "HKCU"

Write-Host ""
Write-Host "== Default User (futuros perfiles) =="
if (LoadDefaultHive) {
  try { ApplyUserTweaksToHive "HKU\DefUser" } finally { UnloadDefaultHive }
}

Write-Host ""
Write-Host "DONE. Reboot recomendado."

try { Stop-Transcript | Out-Null } catch {}
		</File>
		<File path="C:\Windows\Setup\Scripts\Specialize.ps1">
$scripts = @(
	{
		reg.exe add "HKLM\SYSTEM\Setup\MoSetup" /v AllowUpgradesWithUnsupportedTPMOrCPU /t REG_DWORD /d 1 /f;
	};
	{
		Remove-Item -LiteralPath 'Registry::HKLM\Software\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate' -Force -ErrorAction 'SilentlyContinue';
	};
	{
		Remove-Item -LiteralPath 'C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk', 'C:\Windows\System32\OneDriveSetup.exe', 'C:\Windows\SysWOW64\OneDriveSetup.exe' -ErrorAction 'Continue';
	};
	{
		Remove-Item -LiteralPath 'Registry::HKLM\Software\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate' -Force -ErrorAction 'SilentlyContinue';
	};
	{
		reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f;
	};
	{
		&amp; 'C:\Windows\Setup\Scripts\RemovePackages.ps1';
	};
	{
		&amp; 'C:\Windows\Setup\Scripts\RemoveCapabilities.ps1';
	};
	{
		&amp; 'C:\Windows\Setup\Scripts\RemoveFeatures.ps1';
	};
	{
		net.exe accounts /maxpwage:UNLIMITED;
	};
	{
		reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f
	};
	{
		Remove-Item -LiteralPath 'C:\Users\Public\Desktop\Microsoft Edge.lnk' -ErrorAction 'SilentlyContinue' -Verbose;
	};
	{
		Set-ExecutionPolicy -Scope 'LocalMachine' -ExecutionPolicy 'RemoteSigned' -Force;
	};
	{
		fsutil.exe behavior set disableLastAccess 1;
	};
	{
		reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f;
	};
	{
		reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" /v DisableStartupSound /t REG_DWORD /d 1 /f;
		reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\EditionOverrides" /v UserSetting_DisableStartupSound /t REG_DWORD /d 1 /f;
	};
	{
		reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 1 /f;
	};
	{
		reg.exe add "HKLM\Software\Policies\Microsoft\Edge" /v HideFirstRunExperience /t REG_DWORD /d 1 /f;
	};
	{
		reg.exe add "HKLM\Software\Policies\Microsoft\Edge\Recommended" /v BackgroundModeEnabled /t REG_DWORD /d 0 /f;
		reg.exe add "HKLM\Software\Policies\Microsoft\Edge\Recommended" /v StartupBoostEnabled /t REG_DWORD /d 0 /f;
	};
	{
		&amp; 'C:\Windows\Setup\Scripts\SetStartPins.ps1';
	};
	{
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ControlAnimations" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\AnimateMinMax" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\TaskbarAnimations" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DWMAeroPeekEnabled" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\MenuAnimation" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\TooltipAnimation" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\SelectionFade" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DWMSaveThumbnailEnabled" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\CursorShadow" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ListviewShadow" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ThumbnailsOrIcon" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ListviewAlphaSelect" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DragFullWindows" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ComboBoxAnimation" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\FontSmoothing" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ListBoxSmoothScrolling" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
		Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DropShadow" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
	};
	{
		reg.exe add "HKU\.DEFAULT\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 10 /f;
	};
	{
		  reg.exe add "HKLM\System\CurrentControlSet\Control\DeviceGuard" /v "EnableVirtualizationBasedSecurity" /t REG_DWORD /d 0 /f;
		  reg.exe add "HKLM\System\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /t REG_DWORD /d 0 /f;
		  reg.exe add "HKLM\System\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "EnabledBootId" /t REG_DWORD /d 0 /f;
		  reg.exe add "HKLM\System\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "WasEnabledBy" /t REG_DWORD /d 0 /f;
	};
);

&amp; {
  [float] $complete = 0;
  [float] $increment = 100 / $scripts.Count;
  foreach( $script in $scripts ) {
    Write-Progress -Activity 'Running scripts to customize your Windows installation. Do not close this window.' -PercentComplete $complete;
    '*** Will now execute command &#xAB;{0}&#xBB;.' -f $(
      $str = $script.ToString().Trim() -replace '\s+', ' ';
      $max = 100;
      if( $str.Length -le $max ) {
        $str;
      } else {
        $str.Substring( 0, $max - 1 ) + '&#x2026;';
      }
    );
    $start = [datetime]::Now;
    &amp; $script;
    '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds;
    "`r`n" * 3;
    $complete += $increment;
  }
} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; "C:\Windows\Setup\Scripts\Specialize.log";
		</File>
		<File path="C:\Windows\Setup\Scripts\UserOnce.ps1">
$scripts = @(
	{
		Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage;
	};
	{
		Remove-Item -LiteralPath "${env:USERPROFILE}\Desktop\Microsoft Edge.lnk" -ErrorAction 'SilentlyContinue' -Verbose;
	};
	{
		Set-ItemProperty -LiteralPath 'Registry::HKCU\AppEvents\Schemes' -Name '(Default)' -Type 'String' -Value '.None';
	};
	{
		reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /ve /f;
	};
	{
		Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'LaunchTo' -Type 'DWord' -Value 1;
	};
	{
		Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Search' -Name 'SearchboxTaskbarMode' -Type 'DWord' -Value 1;
	};
	{
		Set-ItemProperty -LiteralPath 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects' -Name 'VisualFXSetting' -Type 'DWord' -Value 2 -Force;
	};
	{
		Get-Process -Name 'explorer' -ErrorAction 'SilentlyContinue' | Where-Object -FilterScript {
			$_.SessionId -eq ( Get-Process -Id $PID ).SessionId;
		} | Stop-Process -Force;
	};
);

&amp; {
  [float] $complete = 0;
  [float] $increment = 100 / $scripts.Count;
  foreach( $script in $scripts ) {
    Write-Progress -Activity 'Running scripts to configure this user account. Do not close this window.' -PercentComplete $complete;
    '*** Will now execute command &#xAB;{0}&#xBB;.' -f $(
      $str = $script.ToString().Trim() -replace '\s+', ' ';
      $max = 100;
      if( $str.Length -le $max ) {
        $str;
      } else {
        $str.Substring( 0, $max - 1 ) + '&#x2026;';
      }
    );
    $start = [datetime]::Now;
    &amp; $script;
    '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds;
    "`r`n" * 3;
    $complete += $increment;
  }
} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; "$env:TEMP\UserOnce.log";
		</File>
		<File path="C:\Windows\Setup\Scripts\DefaultUser.ps1">
$scripts = @(
	{
		reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f;
	};
	{
		reg.exe add "HKU\DefaultUser\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore" /f;
	};
	{
		Remove-ItemProperty -LiteralPath 'Registry::HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Run' -Name 'OneDriveSetup' -Force -ErrorAction 'Continue';
	};
	{
		reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\GameDVR" /v AppCaptureEnabled /t REG_DWORD /d 0 /f;
	};
	{
		reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f;
	};
	{
		&amp; 'C:\Windows\Setup\Scripts\TurnOffSystemSounds.ps1';
	};
	{
		$names = @(
		  'ContentDeliveryAllowed';
		  'FeatureManagementEnabled';
		  'OEMPreInstalledAppsEnabled';
		  'PreInstalledAppsEnabled';
		  'PreInstalledAppsEverEnabled';
		  'SilentInstalledAppsEnabled';
		  'SoftLandingEnabled';
		  'SubscribedContentEnabled';
		  'SubscribedContent-310093Enabled';
		  'SubscribedContent-338387Enabled';
		  'SubscribedContent-338388Enabled';
		  'SubscribedContent-338389Enabled';
		  'SubscribedContent-338393Enabled';
		  'SubscribedContent-353694Enabled';
		  'SubscribedContent-353696Enabled';
		  'SubscribedContent-353698Enabled';
		  'SystemPaneSuggestionsEnabled';
		);
		
		foreach( $name in $names ) {
		  reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v $name /t REG_DWORD /d 0 /f;
		}
	};
	{
		reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarDeveloperSettings" /v TaskbarEndTask /t REG_DWORD /d 1 /f;
	};
	{
		reg.exe add "HKU\DefaultUser\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 10 /f;
	};
	{
		reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v "UnattendedSetup" /t REG_SZ /d "powershell.exe -WindowStyle \""Hidden\"" -ExecutionPolicy \""Unrestricted\"" -NoProfile -File \""C:\Windows\Setup\Scripts\UserOnce.ps1\""" /f;
	};
);

&amp; {
  [float] $complete = 0;
  [float] $increment = 100 / $scripts.Count;
  foreach( $script in $scripts ) {
    Write-Progress -Activity 'Running scripts to modify the default user&#x2019;&#x2019;s registry hive. Do not close this window.' -PercentComplete $complete;
    '*** Will now execute command &#xAB;{0}&#xBB;.' -f $(
      $str = $script.ToString().Trim() -replace '\s+', ' ';
      $max = 100;
      if( $str.Length -le $max ) {
        $str;
      } else {
        $str.Substring( 0, $max - 1 ) + '&#x2026;';
      }
    );
    $start = [datetime]::Now;
    &amp; $script;
    '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds;
    "`r`n" * 3;
    $complete += $increment;
  }
} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; "C:\Windows\Setup\Scripts\DefaultUser.log";
		</File>
		<File path="C:\Windows\Setup\Scripts\FirstLogon.ps1">
$scripts = @(
	{
		Set-ItemProperty -LiteralPath 'Registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name 'AutoLogonCount' -Type 'DWord' -Force -Value 0;
	};
	{
		cmd.exe /c "rmdir C:\Windows.old";
	};
	{
		&amp; 'C:\Windows\Setup\Scripts\unattend-01.ps1';
	};
	{
		Remove-Item -LiteralPath @(
		  'C:\Windows\Panther\unattend.xml';
		  'C:\Windows\Panther\unattend-original.xml';
		  'C:\Windows\Setup\Scripts\Wifi.xml';
		) -Force -ErrorAction 'SilentlyContinue' -Verbose;
	};
);

&amp; {
  [float] $complete = 0;
  [float] $increment = 100 / $scripts.Count;
  foreach( $script in $scripts ) {
    Write-Progress -Activity 'Running scripts to finalize your Windows installation. Do not close this window.' -PercentComplete $complete;
    '*** Will now execute command &#xAB;{0}&#xBB;.' -f $(
      $str = $script.ToString().Trim() -replace '\s+', ' ';
      $max = 100;
      if( $str.Length -le $max ) {
        $str;
      } else {
        $str.Substring( 0, $max - 1 ) + '&#x2026;';
      }
    );
    $start = [datetime]::Now;
    &amp; $script;
    '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds;
    "`r`n" * 3;
    $complete += $increment;
  }
} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; "C:\Windows\Setup\Scripts\FirstLogon.log";
		</File>
	</Extensions>
</unattend>