Hello everyone. I am a newbie, I recently got acquainted with your wonderful tool and am trying to figure it out, please answer if it does not take you a lot of time for a few stupid questions. Sorry, I do not speak the language well, so I am writing through the google translator. - Enable Fraunhofer MP3 Professional Codec (does this provide any advantage and in which applications are these codecs used?) - Force .NET Programs to Use Newest .NET Framework (is it for dependent applications to use .NET 4.8, there will be no errors because of this?) - Please give advice, maybe someone has a long-proven and ready-made list for removing applications from windows, which will never cause problems for users? What is the compression ratio of the image when converting to .esd? The same as / Compress: recovery or another, can I set the compression ratio of the images myself?
- Enable Fraunhofer MP3 Professional Codec is used in Audio Video Editing/Conversion Software. - Force .NET Programs to Use Newest .NET Framework can able applications written in older framework to use the latest one but few people had reported it to causes errors for some programs. - The full list is found in <Bin\Lists\ToolKitHelper_Templates> folder and the compatibility info is present in the menus. IE is required for Online Installers like Adobe, WMP may be required for some Multimedia softwares. The DISM is used for all image related operations expect the removal so the compression ratio is same.
@MSMG Ok, i stand correct...You are correct, as on a fresh VM OS the sourcehash file isn't installed, must be Office or something then....I'll redo it on the VM. It's weird tho...as it seems to work just fine on my main W7 OS. Everything is perfect, identical each time i recapture the files, as it should be according to your guide/tips except for the "Program Files (x86) folder from the X64 OS. Those files are identical as on x86, and those get set correctly, as the "Program Files" folder from X64 Something fishy about this (x86) one for sure PS: How do you set the folder permissions btw if i may ask? As those are not correct when you just capture and build the tpk.
I do not set the permissions, I do capture the initial ESD using wimlib-imagex.exe with a script containing the list of files to be captured. Command used to capture the image Code: wimlib-imagex capture C:\ PowerShell7_w7_x64.esd test test --compress=LZMS --solid --config=scripts\PowerShell7.ini >nul Contents of PowerShell7.ini Code: [ExclusionList] \ [ExclusionException] \Program Files\PowerShell \Program Files (x86)\PowerShell \ProgramData\Microsoft\NetFramework\BreadcrumbStore \ProgramData\Microsoft\Windows\Start Menu\Programs\PowerShell \Windows\Installer For Windows 7 the below line is not required Code: \ProgramData\Microsoft\NetFramework\BreadcrumbStore If your system is already affected by folder permission bug then it's a tedious task to fix it, better you may re-install the OS.
@MSMG Oh..ok. It should work out of the box I fix it this way and it works fine except for "index2" Program Files (x86) that one keeps giving NT Security: xxxxx Domain d:xxxx Adapt it for new x86/64 builds. Not sure where the folder permission bug is coming from as it's a fresh OS install, nothing else added...Only the required stuff for PowerShell. Have to try again on vm then... Code: @echo off setlocal enabledelayedexpansion pushd "%~dp0bin" if exist "%windir%\SysWOW64" set "arch=x64" if not exist "%windir%\SysWOW64" set "arch=x86" set wimlib=%~dp0bin\%arch%\wimlib-imagex.exe set dism=%~dp0bin\%arch%\dism10\dism set nsudo=%~dp0bin\%arch%\nsudo set icacls=%~dp0bin\%arch%\icacls.exe set cecho=%~dp0bin\%arch%\cecho.exe set psini=%~dp0bin\%arch%\PowerShell.ini %cecho% {07}Create {0a}PowerShell Build 7.x.x X86 {07}:: {0a}X64 TPK Package {#} echo. echo. echo. echo. %cecho% {07}[1] {0a}:: {1f}Capture PowerShell Build 7.x.x X86 {#} echo. echo. rem wimlib -- x86 config.ini %nsudo% -U:T -P:E cmd /c %wimlib% capture c:\ %~dp0bin\x86\PowerShell7_WIN7_x86.wim "Windows PowerShell 7.1.2 (x86)" "Windows PowerShell 7.1.2 (x86)" --config=%psini% rem wimlib -- x86 source.txt command 1 rem %nsudo% -U:T -P:E cmd /c %wimlib% capture %~dp0bin\x86\PowerShell_X86-source.txt %~dp0bin\x86\powershell7_WIN7_x86.wim --source-list rem wimlib -- source.txt command 2 rem %nsudo% -U:T -P:E cmd /c %wimlib% capture %~dp0bin\x86\PowerShell_X86-source.txt %~dp0bin\x86\powershell7_WIN7_x86.wim --strict-acls --source-list :nxt %cecho% {07}[2] {0a}:: {1f}Capture PowerShell Build 7.x.x X64 {#} echo. echo. rem wimlib -- x64 config.ini %nsudo% -U:T -P:E cmd /c %wimlib% capture M:\ %~dp0bin\x64\PowerShell7_WIN7_x64.wim "Windows PowerShell 7.1.2 (x64)" "Windows PowerShell 7.1.2 (x64)" --config=%~dp0bin\x64\PowerShell.ini rem wimlib -- x64 source.txt command 1 rem %nsudo% -U:T -P:E cmd /c %wimlib% capture %~dp0bin\x64\PowerShell_X64-source.txt %~dp0bin\x64\powershell7_WIN7_x64.wim --source-list rem wimlib -- x64 source.txt command 2 rem %nsudo% -U:T -P:E cmd /c %wimlib% capture %~dp0bin\x64\PowerShell_X64-source.txt %~dp0bin\x64\powershell7_WIN7_x64.wim --strict-acls --source-list echo. pause :nxt2 echo. %cecho% {07}[3] {0a}:: {07}Apply the {0a}PowerShell 7.x.x {07}WIN7 {0e}x86 {07}::: {0e}x64 {07}WIM Images {#} echo. echo. md %~dp0bin\x86mount >nul md %~dp0bin\x64mount >nul timeout /t 2 >nul %dism% /Apply-Image /ImageFile:%~dp0bin\x86\PowerShell7_WIN7_x86.wim /Index:1 /ApplyDir:%~dp0bin\x86mount /CheckIntegrity /Verify %dism% /Apply-Image /ImageFile:%~dp0bin\x64\PowerShell7_WIN7_x64.wim /Index:1 /ApplyDir:%~dp0bin\x64mount /CheckIntegrity /Verify echo. pause :nxt3 echo. %cecho% {07}Note: {0a}Modify the mountfolders incase required... {#} echo. echo. pause echo. %cecho% {07}[4] {0a}:: {07}Fix and set the folder permissions and attributes correctly...{#} echo. echo. rem md "%~dp0bin\x86mount\ProgramData\Microsoft\Netframework\BreadcrumbStore" rem md "%~dp0bin\x64mount\ProgramData\Microsoft\Netframework\BreadcrumbStore" rem for /f "delims=" %%L in (%~dp0bin\x86\BreadcrumbStore_x86.txt) do copy "%%L" "%~dp0bin\x86mount\ProgramData\Microsoft\Netframework\BreadcrumbStore" rem for /f "delims=" %%L in (%~dp0bin\x86\BreadcrumbStore_x86.txt) do copy "%%L" "%~dp0bin\x64mount\ProgramData\Microsoft\Netframework\BreadcrumbStore" rem xcopy "%~dp0bin\x86mount2\Program Files (x86)\PowerShell" "%~dp0bin\x64mount\Program Files (x86)\PowerShell\" /s /y >nul rem folder permissions/owner.... %icacls% "%~dp0bin\x86mount\Program Files" /setowner "NT SERVICE\TrustedInstaller" %nsudo% -U:S -P:E cmd /c %icacls% "%~dp0bin\x64mount\Program Files" /setowner "NT SERVICE\TrustedInstaller" %nsudo% -U:S -P:E cmd /c %icacls% "%~dp0bin\x64mount\Program Files (x86)" /setowner "NT SERVICE\TrustedInstaller" %icacls% "%~dp0bin\x86mount\Program Files\PowerShell" /setowner SYSTEM /T %nsudo% -U:S -P:E cmd /c %icacls% "%~dp0bin\x64mount\Program Files\PowerShell" /setowner SYSTEM /T %nsudo% -U:S -P:E cmd /c %icacls% "%~dp0bin\x64mount\Program Files (x86)\PowerShell" /setowner SYSTEM /T rem %icacls% "%~dp0bin\x86mount\ProgramData\Microsoft" /setowner Administrators rem %icacls% "%~dp0bin\x64mount\ProgramData\Microsoft" /setowner Administrators rem %icacls% "%~dp0bin\x86mount\ProgramData\Microsoft\Netframework" /restore "%~dp0bin\installers\BreadcrumbStore_acl" rem %icacls% "%~dp0bin\x64mount\ProgramData\Microsoft\NetframeWork" /restore "%~dp0bin\installers\BreadcrumbStore_acl" %icacls% "%~dp0bin\x86mount\ProgramData\Microsoft\Netframework" /setowner SYSTEM /T %icacls% "%~dp0bin\x64mount\ProgramData\Microsoft\Netframework" /setowner SYSTEM /T rem %icacls% "%~dp0bin\x86mount\ProgramData\Microsoft\Netframework\BreadcrumbStore" /setowner SYSTEM /T rem %icacls% "%~dp0bin\x64mount\ProgramData\Microsoft\Netframework\BreadcrumbStore" /setowner SYSTEM /T rem %icacls% "%~dp0bin\x86mount\ProgramData\Microsoft\Windows" /setowner Administrators rem %icacls% "%~dp0bin\x64mount\ProgramData\Microsoft\Windows" /setowner Administrators %icacls% "%~dp0bin\x86mount\ProgramData\Microsoft\Windows\Start Menu" /setowner Administrators %icacls% "%~dp0bin\x64mount\ProgramData\Microsoft\Windows\Start Menu" /setowner Administrators %icacls% "%~dp0bin\x86mount\ProgramData\Microsoft\Windows\Start Menu\Programs" /setowner Administrators %icacls% "%~dp0bin\x64mount\ProgramData\Microsoft\Windows\Start Menu\Programs" /setowner Administrators %icacls% "%~dp0bin\x86mount\ProgramData\Microsoft\Windows\Start Menu\Programs\PowerShell" /setowner SYSTEM /T %icacls% "%~dp0bin\x64mount\ProgramData\Microsoft\Windows\Start Menu\Programs\PowerShell" /setowner SYSTEM /T rem x86 installer %icacls% "%~dp0bin\x86mount\Windows\Installer\{887BBD1D-0B7E-44E5-B6A6-F06C0CC0E44D}" /setowner SYSTEM %icacls% "%~dp0bin\x86mount\Windows\Installer\SourceHash{887BBD1D-0B7E-44E5-B6A6-F06C0CC0E44D}" /setowner SYSTEM %icacls% "%~dp0bin\x64mount\Windows\Installer\{887BBD1D-0B7E-44E5-B6A6-F06C0CC0E44D}" /setowner SYSTEM %icacls% "%~dp0bin\x64mount\Windows\Installer\SourceHash{887BBD1D-0B7E-44E5-B6A6-F06C0CC0E44D}" /setowner SYSTEM rem x64 installer %icacls% "%~dp0bin\x64mount\Windows\Installer\{357A3946-1572-4A21-9B60-4C7BD1BB9761}" /setowner SYSTEM %icacls% "%~dp0bin\x64mount\Windows\Installer\SourceHash{357A3946-1572-4A21-9B60-4C7BD1BB9761}" /setowner SYSTEM rem Set folder and files attributes attrib -i "%~dp0bin\x86mount\Program Files" attrib -i "%~dp0bin\x86mount\Program Files\*.*" /s /d attrib -i "%~dp0bin\x64mount\Program Files" attrib -i "%~dp0bin\x64mount\Program Files\*.*" /s /d attrib +r "%~dp0bin\x86mount\Program Files" attrib +r "%~dp0bin\x64mount\Program Files" attrib -i "%~dp0bin\x86mount\ProgramData\*.*" /s /d attrib -i "%~dp0bin\x64mount\ProgramData\*.*" /s /d attrib -i "%~dp0bin\x86mount\Windows\Installer\*.*" /s attrib -i "%~dp0bin\x64mount\Windows\Installer\*.*" /s attrib -i "%~dp0bin\x86mount\Windows" attrib -i "%~dp0bin\x64mount\Windows" attrib -a "%~dp0bin\x86mount\Windows" attrib -a "%~dp0bin\x64mount\Windows" attrib -i "%~dp0bin\x86mount" echo. timeout /t 5 >nul :nxt4 echo. %cecho% {07}[5] {0a}:: {07}Capture the {0d}PowerShell7 {07}WIN7 {0e}x86 {07}::: {0e}x64 {07}mounted Builds to {0a}WIM Images... {#} echo. echo. %dism% /Capture-Image /ImageFile:%~dp0bin\x86\PowerShell7_WIN7_x86_2.wim /CaptureDir:%~dp0bin\x86mount\ /Name:"Windows PowerShell 7.1.2 (x86)" /Description:"Windows PowerShell 7.1.2 (x86)" /Compress:max %dism% /Capture-Image /ImageFile:%~dp0bin\x64\PowerShell7_WIN7_x64_2.wim /CaptureDir:%~dp0bin\x64mount\ /Name:"Windows PowerShell 7.1.2 (x64)" /Description:"Windows PowerShell 7.1.2 (x64)" /Compress:max echo. pause :nxt5 echo. %cecho% {07}[6] {0a}:: {07}Export the {0a}PowerShell7 {07}WIN7 {0e}x86 {07}::: {0e}x64 {07}WIM Images {0e}to {07}ESD Images {0a}:: {0d}LZMS:27 {07}Compression {#} echo. echo. %dism% /Export-Image /SourceImageFile:%~dp0bin\x86\PowerShell7_WIN7_x86_2.wim /SourceIndex:1 /Scratchdir:"%~dp0bin\Scratch" /DestinationImageFile:%~dp0bin\x86\PowerShell7_WIN7_x86.tpk /Compress:Recovery echo. pause %dism% /Export-Image /SourceImageFile:%~dp0bin\x64\PowerShell7_WIN7_x64_2.wim /SourceIndex:1 /Scratchdir:"%~dp0bin\\Scratch" /DestinationImageFile:%~dp0bin\x64\PowerShell7_WIN7_x64.esd /Compress:Recovery echo. pause :nxt6 echo. %cecho% {07}[7] {0a}:: {07}Combine the {0a}PowerShell7 {07}WIN7 {0e}x86 {07}::: {0e}x64 {07}ESD Images {#} echo. echo. %wimlib% export %~dp0bin\x64\PowerShell7_WIN7_x64.esd 1 %~dp0bin\x86\PowerShell7_WIN7_x86.tpk "Windows PowerShell 7.1.2 (x64)" "Windows PowerShell 7.1.2 (x64)" --compress=LZMS --solid echo. pause rem %nsudo% -U:T -P:E cmd /c %wimlib% export %~dp0bin\x64\PowerShell7_WIN7_x64_2.wim 1 %~dp0bin\x86\PowerShell7_WIN7_x86_2.tpk "Windows PowerShell 7.1.2 (x64)" "Windows PowerShell 7.1.2 (x64)" --check --solid rem %wimlib% export "%~dp0bin\x86\PowerShell7_WIN7_x86_2.wim" all "%~dp0bin\x86\PowerShell7_WIN7_3.tpk" --compress=LZMS --solid rem %nsudo% -U:S -P:E cmd /c %dism% /Export-Image /SourceImageFile:%~dp0bin\x64\PowerShell7_WIN7_x64_2.wim /SourceIndex:1 /DestinationImageFile:%~dp0bin\x86\PowerShell7_WIN7_x86_2.tpk /DestinationName:"Windows PowerShell 7.1.2 (x64)" /Compress:max rem Optimize the PowerShell7_WIN7 x86/x64 WIM Image :: Fixes "incorrect reference count" reported by 7zip... rem %wimlib% optimize %~dp0bin\x86\PowerShell7_WIN7_3.TPK rem :timer6 rem for /f %%x in ('tasklist /NH /FI "IMAGENAME eq wimlib-imagex.exe"') DO IF %%x == wimlib-imagex.exe goto busy rem goto nxt6 rem :busy rem timeout /t 3 >nul rem goto timer6 :nxt7 echo. %cecho% {0b}Cleanup temp folders and files... {#} echo. echo. ren %~dp0bin\x86\PowerShell7_WIN7_x86.tpk PowerShell7_WIN7.tpk >nul move /y %~dp0bin\x86\PowerShell7_WIN7.tpk %~dp0bin\tpk\PowerShell >nul del %~dp0bin\x86\PowerShell7_WIN7_x86.wim >nul del %~dp0bin\x64\PowerShell7_WIN7_x64.wim >nul del %~dp0bin\x86\PowerShell7_WIN7_x86_2.wim >nul del %~dp0bin\x64\PowerShell7_WIN7_x64_2.wim >nul del %~dp0bin\x64\PowerShell7_WIN7_x64.esd >nul rd /s /q %~dp0bin\x86mount >nul rd /s /q %~dp0bin\x64mount >nul
Hi MSMG I want to integrate language pack into W10 Ltsb EN-US 1607 non-n, so far i got it working without any cu updates But when i integrate CU updates it's not working anymore, i know about the setup media after updates, but what package do i need for 1607 non-n I have the LP an media-FP packs from you're site installed + the 40mb cab LP file from MS I must be missing something
Think the updated image version when the CU is integrated is not getting verified in the Language Pack Integration code. Will check the script.
OK. Setup works with both LP, but Windows wont install correctly, OS is failing when installing updates Is it possible to use component store cleanup, without resetbase ? if i do not enable resetbase [M] option Cleanup resetbase does not all the time get 100%, this happens only on boot.wim an winre.wim, install.wim always gets 100% strange But at least, it is Sfc error free
@MSMG, I replaced the command from the toolkit v9.8 for the Oscdimg and it appears to be working now. MSMG bud, thank you for making this tool on my request and changing it to my liking. You're the best! Leaving the code here for anyone who might find it useful. Code: @echo off color 1f title Bootable ISO Maker setlocal EnableExtensions EnableDelayedExpansion :: Getting HOST architecture If exist "%WinDir%\SysWOW64" set "Oscdimg=%~dp0oscdimg64.exe" If not exist "%WinDir%\SysWOW64" set "Oscdimg=%~dp0oscdimg.exe" set "DVD=%~dp0DVD" set "BIOSBoot=%DVD%\boot\etfsboot.com" set "UEFIBoot=%DVD%\efi\microsoft\boot\efisys.bin" set "ISO=%~dp0ISO" set ISOLabel= set ISOFileName= cls echo.=============================================================================== echo. Make a Bootable DVD ISO Image echo.=============================================================================== echo. echo.------------------------------------------------------------------------------- echo.####Starting Building a DVD ISO Image########################################## echo.------------------------------------------------------------------------------- echo. :: Getting ISO Label Name set /p ISOLabel=Enter ISO Volume Label : echo. :: Getting ISO Filename set /p ISOFileName=Enter ISO Filename : echo. :: Building a Bootable DVD ISO Image for Booting with BIOS/UEFI Systems echo.------------------------------------------------------------------------------- echo.####Building a DVD ISO Image################################################### echo.------------------------------------------------------------------------------- if "%ISOLabel%" equ "" ( if exist "%UEFIBoot%" "%Oscdimg%" -bootdata:2#p0,e,b"%BIOSBoot%"#pEF,e,b"%UEFIBoot%" -o -h -m -u2 -udfver102 "%DVD%" "%ISO%\%ISOFileName%.iso" if not exist "%UEFIBoot%" "%Oscdimg%" -bootdata:1#p0,e,b"%BIOSBoot%" -o -h -m -u2 -udfver102 "%DVD%" "%ISO%\%ISOFileName%.iso" ) if "%ISOLabel%" neq "" ( if exist "%UEFIBoot%" "%Oscdimg%" -bootdata:2#p0,e,b"%BIOSBoot%"#pEF,e,b"%UEFIBoot%" -o -h -m -u2 -udfver102 -l"%ISOLabel%" "%DVD%" "%ISO%\%ISOFileName%.iso" if not exist "%UEFIBoot%" "%Oscdimg%" -bootdata:1#p0,e,b"%BIOSBoot%" -o -h -m -u2 -udfver102 -l"%ISOLabel%" "%DVD%" "%ISO%\%ISOFileName%.iso" ) echo. echo.------------------------------------------------------------------------------- echo.####Finished Building a DVD ISO Image########################################## echo.------------------------------------------------------------------------------- echo. echo.=============================================================================== echo. pause set ISOSource= set ISOLabel= set ISOFileName= color 00 endlocal EnableExtensions EnableDelayedExpansion exit
Will check with 1607 image and report back. Yes you can use component store cleanup, without resetbase and it's normal for progress bar not showing 100% every time. Only for v2004 and above the cleanup is causing the ghost SFC error.
Do I need to mount the image first? If so, how can I list the packages in the txt file? In general, what should the entire script look like? p.s Do not quite understand!
Is Feature update to Windows 10, version 21H1 (19043.844) amd64 from UUP dump supported? I see it can remove components but when I tried integrating f.i. DirectX9c applied something to the image and returned lines of errors about the register. I accidentally closed it before coping full text. It was something like can't write to the registry, it's in use by another process, something like this. The same with dotnet5. But besides that, it works fine. Enabling WSL kinda works, doesn't install Linux kernel. TFTP works. I don't remember what else but it mostly works. To remove everything but keep Sticky Notes Onenote Microsoft Store everything related to games and Xbox weather clock, stopper, countdown (alarms?) photos app, but not exactly - I need this feature to trim a video Could you advise what's 99% 95% 90% 80% safe to remove?