Modifying Custom Windows 10 ISO

Page 1 of 2 12 LastLast

  1. Posts : 6
    Windows
       #1

    Modifying Custom Windows 10 ISO


    Hello Friends!

    I was following this guide to create a custom ISO image - everything worked amazingly well, but I have a quick question.

    Precisely I was following (Custom W10 ISO with pre-installed software, no user accounts) <-- This guide there.

    Create Windows 10 ISO image from Existing Installation

    The image works fine even with autopilot... but I realized that I forgot to modify shortcuts in "Public Desktop" - my question is... how do I make changes to the image? Do I always need to start from scratch? The image will be used in an enterprise environment, so I need a solution that definitely works.

    Hopefully, that will be a quick one.

    Thank you!
      My Computer


  2. Posts : 15,486
    Windows10
       #2

    You should be able to mount the custom.wim as a drive, then delete icons (or copy from elsewhere), then dismount wim. Use a copy of the custom.wim just in case.....
      My Computer


  3. Posts : 2,800
    Windows 7 Pro
       #3

    Hi,

    Yes you can mount the image, make your modifications and commit it back, no problems.
    Code:
    Dism /Mount-image /imagefile:<path_to_Image_file> /MountDir:<target_mount_directory> /optimize
    Make your modifications then commit changes.
    Code:
    Dism /Commit-Image /MountDir:<target_mount_directory>
    or
    Code:
    Dism /Unmount-image /MountDir:<target_mount_directory> /Commit
    Last edited by MaloK; 01 Aug 2022 at 10:53.
      My Computers


  4. Posts : 6
    Windows
    Thread Starter
       #4

    cereberus said:
    You should be able to mount the custom.wim as a drive, then delete icons (or copy from elsewhere), then dismount wim. Use a copy of the custom.wim just in case.....
    How can I do that? Would you be able to give me some better guidance? I never had to do this before and I'd like to do it right.

    Thanks for the quick help!

    - - - Updated - - -

    MaloK said:
    Hi,

    Yes you can mount the image, make your modifications and commit it back, no problems.
    Code:
    DISM /Mount-image /imagefile:<path_to_Image_file> /MountDir:<target_mount_directory> /optimize
    Make your modifications then commit changes.
    Code:
    Dism /Commit-Image /MountDir:<target_mount_directory>
    or
    Code:
    Dism /Unmount-image /MountDir:<target_mount_directory> /Commit
    Thanks for your advice, although I don't know how do I save the image once I've made the changes. Is Target Mount Directory the place where I'd like to save it? Sorry but I never done this before :)
      My Computer


  5. Posts : 2,800
    Windows 7 Pro
       #5

    Mortissimo said:
    How can I do that? Would you be able to give me some better guidance? I never had to do this before and I'd like to do it right.

    Thanks for the quick help!

    - - - Updated - - -



    Thanks for your advice, although I don't know how do I save the image once I've made the changes. Is Target Mount Directory the place where I'd like to save it? Sorry but I never done this before :)
    Yes sure, this is a complete example: Create the folder C:\MountPoint before running the command.
    Code:
    Dism /Mount-image /imagefile:C:\MyCustomImages\MyImage.wim /MountDir:C:\MountPoint /optimize
    Then in your Folder C:\MountPoint you will find your windows installation "as is" once restored, Make all the changes you want there.

    Then commit the changes back to your image.
    Code:
    Dism /Unmount-image /MountDir:C:\MountPoint /Commit
    This will update your image and write all changes to it.
      My Computers


  6. Posts : 6
    Windows
    Thread Starter
       #6

    Thank you so much I will try that tomorrow morning and get back to you about how did I get on with it :)!

    - - - Updated - - -

    MaloK said:
    Yes sure, this is a complete example: Create the folder C:\MountPoint before running the command.
    Code:
    Dism /Mount-image /imagefile:C:\MyCustomImages\MyImage.wim /MountDir:C:\MountPoint /optimize
    Then in your Folder C:\MountPoint you will find your windows installation "as is" once restored, Make all the changes you want there.

    Then commit the changes back to your image.
    Code:
    Dism /Unmount-image /MountDir:C:\MountPoint /Commit
    This will update your image and write all changes to it.
    Unfortunately I'm getting an error when trying to run the first command:

    Error: 87

    A required option is missing from the command line.

    Ensure that /index or /name is specified.

    - - - Updated - - -

    Ok, I have managed to pass that error by adding /index:1 at the end of the install.wim file in the command.

    Now the question... I know I can move icons etc around, but how do I install additional software? Are there any commands for that as well?

    Thank you for all your help so far guys
      My Computer


  7. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #7

    Hello @Mortissimo,

    Mortissimo said:
    Unfortunately I'm getting an error when trying to run the first command:

    Error: 87

    A required option is missing from the command line.

    Ensure that /index or /name is specified.
    Just for information. I seem to remember from past tests that I have done that that error [ I think ] also applies to an image that is STILL Mounted, although that does NOT appear to be the case in this situation, but it might be worth bearing in mind in the future.
      My Computer


  8. Posts : 4,187
    Windows 11 Pro, 22H2
       #8

    I came upon your post just today and I can assist with a partial answer.

    I'll start by saying that I don't know how mounting the image file is going to allow you to modify shortcuts in "Public Desktop". Someone else may need to answer that part of your question.

    However, as for the syntax of the command that you are using to mount your install.wim, bear in mind that a typical Windows image holds more than one edition of Windows. For example, if you download Windows from Microsoft it will contain Windows Home, Pro, Education, etc. Each edition has a unique name and Index number that it can be referenced by. From here on I'll refer only to the index number; I've never seen anyone actually reference the edition using the name, although it is perfectly valid to do so.

    To illustrate what I mean, mount a Windows ISO image. I'll assume that it is mounted to drive letter E:. Then, run this command:

    DISM /Get-WimInfo /WimFile:"E:\Sources\install.wim"

    The output will show you the index, name, and description of each edition of Windows contained within the image.

    Note that when you created your custom image, you created an image that has only a single Windows edition, thus, the only index number will be "1".

    With that in mind, here is the command that was causing you difficulties:

    Dism /Mount-image /imagefile:C:\MyCustomImages\MyImage.wim /MountDir:C:\MountPoint /optimize

    Modify that command like this:

    Dism /Mount-image /imagefile:C:\MyCustomImages\MyImage.wim /index:1 /MountDir:C:\MountPoint /optimize

    That will get your image mounted. How to modify it to accomplish your goal is up to you

    To summarize: DISM needs to know what edition of Windows to mount when multiple editions are available. Even if there is only one edition, as in your case, you still have to tell DISM which edition to use based upon the name or index number. It's not smart enough to know in advance that there is only a single index.
      My Computers


  9. Posts : 4,592
    several
       #9

    Now the question... I know I can move icons etc around, but how do I install additional software? Are there any commands for that as well?
    A mounted wim image can be serviced . Which means installing/uninstalling updates/packages/drivers.

    Files and folders can be manually added or deleted.

    I dont know a way of installing 3rd party programs into a mounted wim image.

    Do you still have the syprepped os flat on a disk or do you now only have the captured wim?

    If you still have it on disk , you could boot into it, press ctrl+shift+F10 at first oobe screen then after it reboots into audit mode install the programs you forgot. Generalise it again.

    Then append it to the first wim you made.
      My Computer


  10. Posts : 6
    Windows
    Thread Starter
       #10

    Thank you that's really helpful.

    What do you mean on the disk? I have it on the disk but I have already booted into this image to create an ISO, so I believe I need to start from scratch every time I made a mistake? That's so annoying, how I can avoid this? 🤦 I'm trying to modify the wim file now as that's just a couple of shortcuts on the desktop that doesn't work, so I've recreated them and I'll see if that worked.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:52.
Find Us




Windows 10 Forums