How to copy/move files from the ISO to the Public Desktop (batch)

yNEX

New Member
Hey, I actually signed up just to ask this question I'm trying to solve for around 2 days (18 hours each day perhaps :D). I want to copy some files/folders from the Win10-ISO to the Desktop (basically the installation drive) with a batch script. So here's my last solution for this which seems to be almost the correct one (theoretically). Here are the facts.


- Filename I want to copy to Desktop: ExtraISO.7z (~60mb)
- I know its located at this path: \sources\$OEM$\$$\Setup\Files\ExtraISO.7z
- I added my batch.bat file like ExtraISO.7z as a file within the Post-Setup section. So it's located at \sources\$OEM$\$$\Setup\Files\batch.bat too
- My batch.bat contains:
Set src=%~d0
xcopy "%src%\sources\$OEM$\$$\Setup\Files\ExtraISO.7z" "%homedrive%\Users\Public\Desktop\" /Y /F


Explanation:
Set scr=%~d0 --> set a variable called src and %~d0 will get the drive letter where the batch file is executed so I can work with it instead of guessing the drive letter of the installation stick
xcopy "%src%\sources\$OEM$\$$\Setup\Files\ExtraISO.7z" "%homedrive%\Users\Public\Desktop\" /Y /F --> Copies the file ExtraISO.7z to the Public Desktop (Public, because it's the only one which exists when the SetupComplete.cmd get executed; I activated the function to auto-create a user called yNEX with no password.

In my opinion, everything seems to be perfect but I won't copy ANY file/folder ANYwhere. I'm absolutely out of ideas. I even tested the script on my local machine. It works flawless but it doesn't if I use it as Post-Setup.

PS: Does anyone know why ma ISO file size increased from ~3GB to ~8GB? The only difference I can get is that the 8GB one contains a folder called install within the /sources folder. The smaller ISO files don't contain this folder.8gb3gb.PNG
 
Try to put your file in:
sources\$OEM$\$1\Users\Public\Desktop\ExtraISO.7z

No commands and it should work.

For the increased ISO file size, show us the install folder content and we'll see.
 
So I'd have to create another folder inside $OEM$ called$1? Could you tell me how I can add files to these locations? I don't know a way to open and add files/folders to the ISO File. The install Folder contains stuff like Programm Files, Programm Files (x86), Windows and so on. Looks like root of C:/
 
If I may jump in.

It's the image folder, you can right-click the image folder on the Source page and choose Explore directory, or just go there with explorer.
In your case it's F:\Win10HomeCustom...\ [here you can do what Kasual recommended]

Also if you need it to be inside the WIM/image file, you can right-click the loaded image and choose Explore mount directory, then directly save there.
Just make sure to close any open files or folders before saving/applying the image.
 
If I may jump in.

It's the image folder, you can right-click the image folder on the Source page and choose Explore directory, or just go there with explorer.
In your case, it's F:\Win10HomeCustom...\ [here you can do what Kasual recommended]

Also if you need it to be inside the WIM/image file, you can right-click the loaded image and choose to Explore mount directory, then directly save there.
Just make sure to close any open files or folders before saving/applying the image.


I made it pretty complex this morning before I noticed that I can just use my image folder. A very neat thing to know. I think the file size was increased that much (from 3GB to 8GB) because I accidentally copied the install folder from somewhere to this folder. I'm now wondering why this work's like it actually does? I mean what if I name the folder $2? Is there any background information about this? And do you have any tip how I could shrink the size of my actual ISO File without removing anything else?


Thanks for your amazing software and support on this forum!
 
You're welcome.

When ISO file is created, it's created from the whole folder you selected, it would be impossible to scan for unnecessary files as people can choose to put on the ISO whatever they want. For example to have extra tools on the USB stick or inside the Virtual Machine test.

There are ISO components listed separately on the Components page, you can remove those. And in case of Win8 or 10, enable ESD compression on the Apply page - Imaging tasks.

Here is the list of $OEM$ folders, all the other ones will just be ignored by the setup.
 
Here is the list of $OEM$ folders, all the other ones will just be ignored by the setup.

That is somewhat outdated (Legacy) information, i could fix the On-screen keyboard localization by putting a desktop.ini copy with hidden attribute in this path:
sources\$OEM$\$1\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Accessibility

Also i could replace the default user account picture (pictures with the same name replaces the original pictures) with my fav:
sources\$OEM$\$1\ProgramData\Microsoft\User Account Pictures

Maybe there are supported every unprotected file/folder replacement.

These paths works too:
sources\$OEM$\$$\Resources\Themes (for win 7, the copy works with Win10 but you won't see any desktop theme)
sources\$OEM$\$$\Web\Screen windows 10 lockscreen wallpapers
sources\$OEM$\$$\Web\Wallpaper\Windows windows 10 desktop wallpapers, i think here can be replaced te default desktop wallpaper for 7
 
That is somewhat outdated (Legacy) information, i could fix the On-screen keyboard localization by putting a desktop.ini copy with hidden attribute in this path:
sources\$OEM$\$1\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Accessibility

Also i could replace the default user account picture (pictures with the same name replaces the original pictures) with my fav:
sources\$OEM$\$1\ProgramData\Microsoft\User Account Pictures

Maybe there are supported every unprotected file/folder replacement.

These paths works too:
sources\$OEM$\$$\Resources\Themes (for win 7, the copy works with Win10 but you won't see any desktop theme)
sources\$OEM$\$$\Web\Screen windows 10 lockscreen wallpapers
sources\$OEM$\$$\Web\Wallpaper\Windows windows 10 desktop wallpapers, i think here can be replaced te default desktop wallpaper for 7

Hello @Kasual & @nuhi

Also, is there any option to convert the install.wim to install.esd before creating the final ISO, then kindly tell me, or add this features
 
Last edited by a moderator:
Hello @Kasual & @nuhi

Also, is there any option to convert the install.wim to install.esd before creating the final ISO, then kindly tell me, or add this features
Yes, there is the Apply - Image options - Image Format - ESD, if Win8+.
See ntlite.com/documentation for more info.
 
Back
Top