Bu Blogda Ara

Vmware Workstationdaki Sanal makine ile Windows 11 Pro Custom ISO oluşturmak






İçinde istediğimiz tüm uygulama ve sürücülerin kurulu olduğu hazır bir windows 11 iso dosyası oluşturmak ve bu iso'yu kullanarak bir windows kurulum usb si oluşturmak ister misiniz? Cevabınız evetse doğru yere geldiniz...




WİNDOWS 11 PRO TÜRKÇE VE PROGRAMLARI KUR:

Sanal sunucuya Windows 11 pro kur. Ofis ve diğer programları kur.Tüm güncellemeleri de kur.

Sunucuyu yeniden başlat.



Disk temizleme ve sysprep yap:

Disk Temizleme (Cleanmgr) yapın.

Dos satırında Cleanmgr komutunu çalıştır...Herşeyi temizle..



Şimdi cd “C:\Windows\System32\Sysprep” ile

klasöre girerek

sysprep /generalize /oobe /shutdown

komutunu çalıştırın. Eğer sysprep hata verirse tüm güncellemelerin yapılıp makinenin yeniden başlattığını ve pc nin güncel olduğunu kontrol et. Cleanmgr çalışırken de sysprep tetikleyebilirsin.






WİNDOWS İMAJINI AL:

Şimdi kapalı olan sanal makinenin içindeki "C:" sürücüsünü (Windows'un kurulu olduğu yer) bir imaj dosyası olarak dışarı çıkaracağız.
VMware ayarlarından (Settings -> CD/DVD), orijinal bir Windows 11 ISO'sunu bağlayın.
Sanal makineyi başlatın ve hemen ESC ile Boot menüsüne girerek CD-ROM'u seçin.







Windows kurulum ekranı geldiğinde hiçbir şeye tıklamayın, Shift + F10 tuşlarına basarak komut satırını açın.

Windows İmajını Yakalama (Capture)

Komut satırında önce Windows'un hangi harfte olduğunu bulun (Sanal ortamda genelde C: veya D: olur). dir C: komutuyla windows klasörlerini kontrol edebilirsiniz.dir D: ya da dir E: komutuyla harici diski görüntüleyin. Ardından şu komutu yazarak sistemi paketleyin:

dism /Capture-Image /ImageFile:E:\install.wim /CaptureDir:C:\ /Name:"Win11_with_ofice"

(Burada D: ya da E: diski; yedeği kaydedeceğiniz (sanal makineye eklediğiniz ikinci bir sanal disk veya paylaşımlı klasör) sürücüdür.)






YENİ ISO DOSYASINI HAZIRLAMA

Artık elinde sana özel programların olduğu dev bir install.wim dosyası var.
Orijinal Windows 11 ISO dosyasını AnyBurn ile aç).
sources klasörünün içine git.
Oradaki orijinal install.wim dosyasını sil ve yerine yukarda kendi oluşturduğun install.wim dosyayı yapıştır.
Windows 11 Pro için uygun autounattend.xml dosyasını da ISO nun ana dizinine koy.
Anyburn kullanarak dosyaları tekrar ISO olarak paketle.



Autounattend.xml dosyası içeriği:

<?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=tr-TR&Locale=tr-TR&Keyboard=0000041f&GeoLocation=235&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&BypassNetworkCheck=true&HidePowerShellWindows=true&ComputerNameMode=Random&CompactOsMode=Default&TimeZoneMode=Implicit&PartitionMode=Unattended&PartitionLayout=GPT&EspSize=300&RecoveryMode=Partition&RecoverySize=1024&DiskAssertionMode=Skip&WindowsEditionMode=Generic&WindowsEdition=pro&InstallFromMode=Automatic&PEMode=Default&UserAccountMode=Unattended&AutoLogonMode=Builtin&BuiltinAdministratorPassword=&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&ClassicContextMenu=true&TaskbarSearch=Box&TaskbarIconsMode=Default&DisableWidgets=true&DisableBingResults=true&StartTilesMode=Default&StartPinsMode=Default&PreventDeviceEncryption=true&EffectsMode=Default&DeleteEdgeDesktopIcon=true&DesktopIconsMode=Default&StartFoldersMode=Default&WifiMode=Skip&ExpressSettings=DisableAll&LockKeysMode=Skip&StickyKeysMode=Default&ColorMode=Default&WallpaperMode=Default&LockScreenMode=Default&FirstLogonScript0=slmgr+%2Fipk+W269N-WFGWX-YVC9B-4J6C9-T83GX&FirstLogonScriptType0=Cmd&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>tr-TR</UILanguage>

</component>

<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">

<ImageInstall>

<OSImage>

<InstallTo>

<DiskID>0</DiskID>

<PartitionID>3</PartitionID>

</InstallTo>

</OSImage>

</ImageInstall>

<UserData>

<ProductKey>

<Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</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>

<RunSynchronousCommand wcm:action="add">

<Order>4</Order>

<Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" (echo:SELECT DISK=0&amp;echo:CLEAN&amp;echo:CONVERT GPT&amp;echo:CREATE PARTITION EFI SIZE=300&amp;echo:FORMAT QUICK FS=FAT32 LABEL=^"System^"&amp;echo:ASSIGN LETTER=S&amp;echo:CREATE PARTITION MSR SIZE=16&amp;echo:CREATE PARTITION PRIMARY)"</Path>

</RunSynchronousCommand>

<RunSynchronousCommand wcm:action="add">

<Order>5</Order>

<Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" (echo:SHRINK MINIMUM=1024&amp;echo:FORMAT QUICK FS=NTFS LABEL=^"Windows^"&amp;echo:ASSIGN LETTER=W&amp;echo:CREATE PARTITION PRIMARY&amp;echo:FORMAT QUICK FS=NTFS LABEL=^"Recovery^"&amp;echo:ASSIGN LETTER=R)"</Path>

</RunSynchronousCommand>

<RunSynchronousCommand wcm:action="add">

<Order>6</Order>

<Path>cmd.exe /c "&gt;&gt;"X:\diskpart.txt" (echo:SET ID=^"de94bba4-06d1-4d40-a16a-bfd50179d6ac^"&amp;echo:GPT ATTRIBUTES=0x8000000000000001)"</Path>

</RunSynchronousCommand>

<RunSynchronousCommand wcm:action="add">

<Order>7</Order>

<Path>cmd.exe /c "diskpart.exe /s "X:\diskpart.txt" &gt;&gt;"X:\diskpart.log" || ( type "X:\diskpart.log" &amp; echo diskpart encountered an error. &amp; pause &amp; exit /b 1 )"</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>041f:0000041f</InputLocale>

<SystemLocale>tr-TR</SystemLocale>

<UILanguage>tr-TR</UILanguage>

<UserLocale>tr-TR</UserLocale>

</component>

<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">

<UserAccounts>

<AdministratorPassword>

<Value></Value>

<PlainText>true</PlainText>

</AdministratorPassword>

</UserAccounts>

<AutoLogon>

<Username>Administrator</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\unattend-01.cmd">

slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX

</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;

};

{

reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f;

};

{

net.exe accounts /maxpwage:UNLIMITED;

};

{

Remove-Item -LiteralPath 'C:\Users\Public\Desktop\Microsoft Edge.lnk' -ErrorAction 'SilentlyContinue' -Verbose;

};

{

reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f;

};

{

reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /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 = @(

{

Remove-Item -LiteralPath "${env:USERPROFILE}\Desktop\Microsoft Edge.lnk" -ErrorAction 'SilentlyContinue' -Verbose;

};

{

reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /ve /f;

};

{

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\Explorer" /v DisableSearchBoxSuggestions /t REG_DWORD /d 1 /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;

};

{

C:\Windows\Setup\Scripts\unattend-01.cmd;

};

{

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>

Hiç yorum yok:

Yorum Gönder