Windows 10: Request for user testing a batch file that handles large install.wim

Discus and support Request for user testing a batch file that handles large install.wim in Windows 10 Installation and Upgrade to solve the problem; I created a tutorial for creating a usb installation drive with a custom install.wim greater than 4GB. Create bootable USB installer if install.wim is... Discussion in 'Windows 10 Installation and Upgrade' started by cereberus, Nov 3, 2018.

  1. cereberus Win User

    Request for user testing a batch file that handles large install.wim


    I created a tutorial for creating a usb installation drive with a custom install.wim greater than 4GB.

    Create bootable USB installer if install.wim is greater than 4GB | Windows 10 Tutorials

    I have been upgrading the batch file so it creates the diskpart.dat and ei.cfg files automatically

    I would like some user feedback.

    It is quite easy to customise now.

    Main things to set are

    1) drive and path to where the installation files are - they can be a mounted iso or any directory
    2) disk number of usb drive when inserted - use diskpart list disk to identify or look in disk management
    The script here initially sets it as 99 to avoid deleting a drive if you do not change the number
    3) drive and path to where install.wim is if different location (set WIMDIFFLOC to 1)

    For the purposes of testing, it does not really matter if install.wim is less than 4GB.

    Simply copy all the code into a batch text file e.g. usbcreate.bat, customise as above and run with admin rights.

    You need an 8GB drive as a minimum, and all files on drive will be wiped. Original source files are only copied and never affected.

    Code: echo on REM ------------------------------------------------------------------------------ REM SET DRIVE LETTER AND PATH OF SOURCE ISO OR DIRECTORY FILES REM MAKE SURE NO TRAILING BLANKS AND PATH FINISHES WITH A \ SET SOURCEFILES=D:\ REM IF CUSTOM INSTALL.WIM IS NOT IN SOURCES DIRECTORY, SET WIMDIFFLOC TO 1 SET WIMDIFFLOC=0 REM SET DRIVE LETTER OF CUSTOM INSTALL.WIM REM MAKE SURE NO TRAILING BLANKS AND PATH FINISHES WITH A \ SET WIMFILE=D:\SOURCES\ REM SET USB FAT32 AND NTFS DRIVE LETTERS (USE HIGHER LETTERS YOU DO NOT USE NORMALLY) SET FAT32DRV=Q SET NTFSDRV=R REM SET DRIVE NUMBER OF USB DRIVE - WARNING BE VERY CAREFUL YOU GET THIS RIGHT REM DEFAULT IS SET TO INITIALLY TO 99 TO PREVENT ACCIDENTAL WIPING OF A DRIVE REM YOU CAN CHANGE DEFAULT IF YOU ALWAYS KNOW WHAT DRIVE NUMBER IS ASSIGNED REM TYPICALLY IT WILL BE THAT LAST NUMBER IN DRIVE AND EQUAL TO NUMBER OF INTERNAL HARD DRIVES SET USBDRV=99 REM -------------------------------------------------------------------------------- C: CD\ rd "usbcreate" /s /q md \usbcreate cd \usbcreate md "baseiso" xcopy %SOURCEFILES%*.* "c:\usbcreate\baseiso\" /s /y /q IF %WIMDIFFLOC%==0 GOTO :CONT1 xcopy %WIMFILE% "c:\usbcreate\baseiso\" /s /y /q :CONT1 REM --------------------------------------------------------------------------------------------- REM CREATE DISKPART.DAT echo select disk %USBDRV% > c:\usbcreate\diskpart.dat echo clean >> c:\usbcreate\diskpart.dat echo convert mbr >> c:\usbcreate\diskpart.dat echo create partition primary size=1000 >> c:\usbcreate\diskpart.dat echo create partition primary >> c:\usbcreate\diskpart.dat echo select partition 1 >> c:\usbcreate\diskpart.dat echo format fs=fat32 quick >> c:\usbcreate\diskpart.dat echo assign letter=%FAT32DRV% >> c:\usbcreate\diskpart.dat echo active >> c:\usbcreate\diskpart.dat echo select partition 2 >> c:\usbcreate\diskpart.dat echo format fs=ntfs quick >> c:\usbcreate\diskpart.dat echo assign letter=%NTFSDRV% >> c:\usbcreate\diskpart.dat echo exit >> c:\usbcreate\diskpart.dat diskpart /s "c:\usbcreate\diskpart.dat" echo Exit Code is %errorlevel% if %errorlevel%==0 goto :CONT2 REM DO DISKPART AGAIN IF IT FAILS FIRST TIME - NO IDEA WHY THAT HAPPENS SOMETIMES BUT USUALLY WORKS 2ND TIME diskpart /s "c:\usbcreate\diskpart.dat" echo Exit Code is %errorlevel% if %errorlevel%==0 goto :CONT2 echo Diskpart has failed twice - procedure is aborted echo You can manually partition flash drive and remove this whole section. goto :CONT3 :CONT2 label %fat32drv%:USB-FAT32 label %ntfsdrv%:USB-NTFS REM -------------------------------------------------------------------------------------------- xcopy "c:\usbcreate\baseiso\*.*" %NTFSDRV%:\ /s /y /q rd "c:\usbcreate\baseiso\sources\" /s /q md "c:\usbcreate\baseiso\sources\" xcopy "c:\usbcreate\baseiso\*.*" %FAT32DRV%:\ /s /y /e /q xcopy "%NTFSDRV%:\sources\boot.wim" "%FAT32DRV%:\sources\" /y /q REM -------------------------------------------------------------------------------------------- REM CREATE EI.CFG IN SOURCES FOLDER echo [CHANNEL] > "%NTFSDRV%:\sources\ei.cfg" echo Retail >> "%NTFSDRV%:\sources\ei.cfg" REM --------------------------------------------------------------------------------------------- :CONT3 pause [/quote]

    :)
     
    cereberus, Nov 3, 2018
    #1
  2. johnspack Win User

    Compacting a wim file?

    Actually it turns out the answer is the dism that comes with Win8. Using the new Export-Image command, and a simple batch file, was able to compress my AIO wim by several hundred mbs.
     
    johnspack, Nov 3, 2018
    #2
  3. johnspack Win User
    Compacting a wim file?

    Sorry, no idea where to put this. I just recently learned how to use dism. I use it to slipstream all hotfixes and ie10 ect into an AIO install disc. The problem is, it creates a huge install.wim after 8 index mounts and slipstreams. Considering all 8 images use the same darn wim and files, don't know why it has to increase the wim size by 1gig. Either I need to figure out how to use the same wim.install file for all indexes, or I need to compact the wim file which is now 4gbs with ie10 and all updates to April. Any way to do either?
     
    johnspack, Nov 3, 2018
    #3
  4. Steevo Win User

    Request for user testing a batch file that handles large install.wim

    Batch file to ping network

    No, batch files are extremely easy.

    A "If" requires three extra steps.

    Code is not how much you can put in, but how lite can you make it and still perform the functions.

    So

    @ echo off


    ping 1.4.1.4 >a.txt

    findstr /m "Request timed out" a.txt
    if %errorlevel%%==0 (
    echo Save our nets!!!
    )

    pause
     
    Steevo, Nov 3, 2018
    #4
Thema:

Request for user testing a batch file that handles large install.wim

Loading...
  1. Request for user testing a batch file that handles large install.wim - Similar Threads - Request user testing

  2. Make a windows batch file actually requests for a windows user password

    in Windows 10 Gaming
    Make a windows batch file actually requests for a windows user password: I was thinking of a batch file that you can use the batch file using your actual windows password, but I tried to but I can't.Would you help me?...
  3. Make a windows batch file actually requests for a windows user password

    in Windows 10 Software and Apps
    Make a windows batch file actually requests for a windows user password: I was thinking of a batch file that you can use the batch file using your actual windows password, but I tried to but I can't.Would you help me?...
  4. Renumbering a large batch of files?

    in Windows 10 Gaming
    Renumbering a large batch of files?: How can I renumber not rename! large batches of files? There is a field in music files listed under the heading '#' which could be useful, although I would like to be able to change other properties, too. However, it seems to be very difficult to obtain much more than...
  5. Renumbering a large batch of files?

    in Windows 10 Software and Apps
    Renumbering a large batch of files?: How can I renumber not rename! large batches of files? There is a field in music files listed under the heading '#' which could be useful, although I would like to be able to change other properties, too. However, it seems to be very difficult to obtain much more than...
  6. Renumbering a large batch of files?

    in Windows 10 Network and Sharing
    Renumbering a large batch of files?: How can I renumber not rename! large batches of files? There is a field in music files listed under the heading '#' which could be useful, although I would like to be able to change other properties, too. However, it seems to be very difficult to obtain much more than...
  7. iso for several tests different wim file for customization screens

    in Windows 10 Installation and Upgrade
    iso for several tests different wim file for customization screens: I am building a WIndows 10 setup USB, I would like to test them for screen customization. If I don't sysprep each one and build a wim file from it and create a ISO from it , then test each 5-10 times, build an iso and I retest each, with the same WIndows installation? 149154
  8. Uniquely Renaming Large Batch of Files

    in Windows 10 Ask Insider
    Uniquely Renaming Large Batch of Files: Hello team. Looking to see if anyone has any pointers for my situation at work: I have 90 PDF files that need to be renamed, each of them having unique names that have to deal with a supplier and consignee pair. I have a list of all of the file names in an excel sheet and...
  9. Weird behavior/ sluggish after handling large files

    in Windows 10 Performance & Maintenance
    Weird behavior/ sluggish after handling large files: I've been experiencing a weird problem on my PC for a long time and it's driving me nuts. When I first boot it up it's fine, and as long as I don't handle any large files (like tens of gigabytes or larger), it's fine for days. But if I start copying large files from drive to...
  10. Weird behavior/ sluggish after handling large files

    in Windows 10 Support
    Weird behavior/ sluggish after handling large files: I've been experiencing a weird problem on my PC for a long time and it's driving me nuts. When I first boot it up it's fine, and as long as I don't handle any large files (like tens of gigabytes or larger), it's fine for days. But if I start copying large files from drive to...