To keep this info visible when the chat will be cleaned up: A few examples: Code: wimlib-imagex update "install.wim" 3 --command="add 'Scripts_SRV_2022' '\Windows\Setup\Scripts'" this adds the content of the folder "'Scripts_SRV_2022" to the third index of the install.wim (or install.esd) in the folder \Windows\Setup\Scripts' Code: wimlib-imagex update "install.wim" 3 --command="add 'Scripts_SRV_2022\test.txt' '\Windows\test.txt'" This puts the test.txt file from the 'Scripts_SRV_2022 folder in the Windows folder in index 3 of the install.wim/esd.
wimlib-imagex takes just a second to do it, not mounting, unmounting and over and over again when more indexes need files put in to them. And no extra commands needed when rights are needed.
Judging by the question itself, we mostly try to provide easy solutions first. Something everyone can understand. Yesterday, i saw the same discussion in the chat box. Wimlib command line was given as a solution, but the guy said he didn't get it. Now that he opened a thread for his question, why should i tell him about wimlib again? I opted for Gimagex only because, at first place, it seemed to be easier for him! I also mentioned 7-zip because it's indeed the most used app in this case. Not everyone knows about wimlib-imagex (or image servicing tools in general) and most novices are "scared" by the command line tools! Mount, unmount over and over has its advantages, and it's done in a breeze and transparently. It's not as if you're gonna mount wim files on your shoulders! Wimlib-imagex command line alone will not do the job for me in many situations. I work with wim files almost everyday (WinPE), and i always need to add a lot of things, modify the mounted registry hives, manually modify some WinPE settings and resources,... For these repetitive tasks, the wim file should be mounted anyway. In addition, i use my own wim toolkit written in PECMD scripts format, which also needs a mounted image to work with. (Offline Reg hives updater, Offline Registry defrag, MUI sync, WinPE cache sizer, ..).