diff --git a/Recovery/WindowsRE/ReAgent.xml b/Recovery/WindowsRE/ReAgent.xml new file mode 100644 index 0000000..9db8dab --- /dev/null +++ b/Recovery/WindowsRE/ReAgent.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/screenshot1.png b/screenshot1.png new file mode 100644 index 0000000..9ee1484 Binary files /dev/null and b/screenshot1.png differ diff --git a/screenshot2.png b/screenshot2.png new file mode 100644 index 0000000..7ebd133 Binary files /dev/null and b/screenshot2.png differ diff --git a/unattend.xml b/unattend.xml new file mode 100644 index 0000000..e8a36fb --- /dev/null +++ b/unattend.xml @@ -0,0 +1,167 @@ + + + + + + + + + 1 + cmd.exe /c >>X:\pe.cmd (echo:start X:\Windows\System32\conhost.exe) + + + 2 + cmd.exe /c "X:\pe.cmd" + + + + + + + + + + 1 + powershell.exe -WindowStyle "Normal" -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;" + + + 2 + powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\Specialize.ps1" + + + + + + + + + 0409:00000409 + en-US + en-US + en-US + + + + + + Admin + + Administrators + + + true</PlainText> + </Password> + </LocalAccount> + <LocalAccount wcm:action="add"> + <Name>User</Name> + <DisplayName></DisplayName> + <Group>Users</Group> + <Password> + <Value></Value> + <PlainText>true</PlainText> + </Password> + </LocalAccount> + </LocalAccounts> + </UserAccounts> + <AutoLogon> + <Username>Admin</Username> + <Enabled>true</Enabled> + <LogonCount>1</LogonCount> + <Password> + <Value></Value> + <PlainText>true</PlainText> + </Password> + </AutoLogon> + <OOBE> + <ProtectYourPC>3</ProtectYourPC> + <HideEULAPage>true</HideEULAPage> + <HideWirelessSetupInOOBE>false</HideWirelessSetupInOOBE> + <HideOnlineAccountScreens>false</HideOnlineAccountScreens> + </OOBE> + <FirstLogonCommands> + <SynchronousCommand wcm:action="add"> + <Order>1</Order> + <CommandLine>powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\FirstLogon.ps1"</CommandLine> + </SynchronousCommand> + </FirstLogonCommands> + </component> + </settings> + <Extensions xmlns="https://schneegans.de/windows/unattend-generator/"> + <Build> + <Commit> + <Hash>ba2c89c30cd43bcfe35a7e67e9596a9a11f22e3f</Hash> + <GitHubUrl>https://github.com/cschneegans/unattend-generator/commit/ba2c89c30cd43bcfe35a7e67e9596a9a11f22e3f</GitHubUrl> + </Commit> + </Build> + <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\Specialize.ps1"> +$scripts = @( + { + net.exe accounts /maxpwage:UNLIMITED; + }; +); + +&amp; { + [float] $complete = 0; + [float] $increment = 100 / $scripts.Count; + foreach( $script in $scripts ) { + Write-Progress -Id 0 -Activity 'Running scripts to customize your Windows installation. Do not close this window.' -PercentComplete $complete; + '*** Will now execute command &#xAB;{0}&#xBB;.' -f $( + $script.ToString().Trim() -replace '\s+', ' ' -replace '^(.{99})(.+)$', '$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\FirstLogon.ps1"> +$scripts = @( + { + Set-ItemProperty -LiteralPath 'Registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name 'AutoLogonCount' -Type 'DWord' -Force -Value 0; + }; + { + 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 -Id 0 -Activity 'Running scripts to finalize your Windows installation. Do not close this window.' -PercentComplete $complete; + '*** Will now execute command &#xAB;{0}&#xBB;.' -f $( + $script.ToString().Trim() -replace '\s+', ' ' -replace '^(.{99})(.+)$', '$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> \ No newline at end of file