Modded winsetup.dll for windows8.1

Discussion in 'Windows 8' started by Saks, Mar 19, 2014.

  1. Saks

    Saks MDL Novice

    Feb 4, 2010
    1
    0
    0
    Hi, any one researched for this for windows 8.1 to save those 350 mb of scarce SSD space ? I know this exists for win 7.
     
  2. LiteOS

    LiteOS MDL Expert

    Mar 7, 2014
    1,201
    446
    60
    #2 LiteOS, Mar 19, 2014
    Last edited: Mar 19, 2014
    use diskpart to format it before the installation starting and it wont make this 350mb partition

    shift+f10 to open console
    run diskpart
     
  3. eydee

    eydee Guest

    Diskpart? No. Gparted? Yes.
     
  4. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    6,787
    10,357
    210
    #4 murphy78, Mar 19, 2014
    Last edited by a moderator: Apr 20, 2017
    You don't need to mod the setup at all. You can do everything you need to do with diskpart, dism, and reagentc commands

    Even with UEFI booting, you only need 3 partitions, EFI, MSR, and your primary.
    You could make a partition text file to import with diskpart, just call it format.txt:
    Code:
    select disk 0
    cleanconvert gpt
    rem == 1. System partition (ESP) ===================
    create partition efi size=100
    format quick fs=fat32 label="System"
    rem == 2. Microsoft Reserved (MSR) partition =======
    create partition msr size=128
    rem == 3. Windows partition ========================
    create partition primary
    format quick fs=ntfs label="Windows"
    assign letter=c
    exit
    Then you also make a script to run the diskpart import, apply the image, and run bcdboot and reagentc:
    call this file runscript.bat:
    Code:
    @echo off
    echo.&echo === ATTENTION ===
    echo This script will create partitions on Disk 0
    echo It will apply the install.wim to disk 0
    echo All data on Disk 0 will be lost.
    echo.&echo Press any key to continue. ^(To abort - manually power down your system^)
    pause>NUL
    diskpart /s X:\format.txt
    FOR %%i IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\Sources\install.wim SET INSTALLWIM=%%i:\Sources
    IF NOT EXIST %INSTALLWIM%\install.wim (echo Cannot find the install.wim file
    pause>NUL
    exit
    )
    echo.&echo Applying Install.wim to C drive
    dism /Apply-Image /ImageFile:"%INSTALLWIM%\install.wim" /ApplyDir:C: /Index:1
    echo.&echo Running bcdboot on C:\Windows to register the boot drive with the system
    C:\Windows\System32\bcdboot C:\Windows
    echo.&echo Registering the recovery tools directory with Windows
    C:\Windows\System32\Reagentc /SetREImage /Path C:\Windows\System32\Recovery /Target C:\Windows
    echo.&echo Script completed. Press any key to exit and reboot...
    pause>NUL
    exit
    Now make a final txt file and call it startnet.cmd
    Code:
    wpeinit
    x:\runscript.bat
    mount your bootable winpe image (boot.wim index 2 if using existing setup files)
    replace startnet.cmd with the one in the windows\system32\ directory
    *Delete the windows\system32\winpeshl.ini*
    put format.txt and runscript.bat in the root of the mount directory

    I found this stuff out when doing the wimboot stuff

    edit: I'm not 100% on the reagentc stuff... you might have to create another partition just large enough to fit the winre.wim and move it during the script.. I really don't know.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,475
    627
    60
    WPEINT takes a while to load up so if I'm not going to use networking I don't even run this. It makes for quick booting if all you want to do is say, wipe some hdd/ssd's....
     
  6. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    5,571
    13,002
    180
    Third party tools like Minitool Partiton Wizard bootable cd might do the job, easily. On the understanding the HDD must be partitioned prior to Windows installation. I use it on a daily basis with no issues so far. :cool2: