Loading Windows 7 using Win7 Setup within Win8 PE?

Discussion in 'Windows 8' started by generalmx, Sep 21, 2014.

  1. generalmx

    generalmx MDL Novice

    Apr 15, 2014
    34
    20
    0
    #1 generalmx, Sep 21, 2014
    Last edited: Sep 21, 2014
    I've seen some ISOs floating around which say they'll correctly install Windows 7 and Vista packed as ESDs, despite that being a format which only works with Windows 8's version of DISM, AFAIK. When I booted off of one of these, they showed what appeared to be Windows 7 Setup, but within Windows 8 PE/RE, as evidenced by going to the "Repair" option. Looking within the PE, there seems to be some files which are Windows 7 version that should be Windows 8 version, such as the "spwizimg.dll" file. Using an ESD over a WIM saves a considerable amount of space on a 32GB and smaller Flash Drive --- I can fit Vista,7, & 8 in 12GB --- and I find sometimes the great WinNTSetup tool doesn't always work with an image, where the original Windows Vista or 7 Setup always seems to work.

    Any clues on how this was done, and could I use something like it (with multiple setup PEs) to just install from one single ESD with 8, 7, and Vista?
     
  2. shukree

    shukree MDL Novice

    May 12, 2011
    11
    0
    0
    #2 shukree, Sep 21, 2014
    Last edited: Sep 21, 2014
    the best way to do this is by loading Win8.1PE-x86 or Win8.1PE-x64 from system drive ( you can use EasyBCD 2.2 to add these )

    of course you need to replace Windows 8.1 install.wim by your big (vista.win7.win8.esd ).

    and install from usb or from hard drive which is far better and speedy.

    what i did for my use . I made a small image ( ghost or trueimage ) only having win81 boot files with Win8.1PE-x86.ISO and Win8.1PE-x64.ISO

    the image is about 1 GB, restore this image , boot to either of them depending on x86 or x64, mount the big multi win ISO and install your desired Windows (Vista,Win7,Win8 or Win8.1 )

    good luck

    and sorry for my English
     
  3. KNARZ

    KNARZ MDL Addicted

    Oct 9, 2012
    867
    451
    30
    speaking of unattend setups:
    Win8 Setup is capable to deploy windows 7 wims. - you don't need to modify the winpe. (vice versa:) win7pe aborts at the end of setup with win8 install wim.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. LiteOS

    LiteOS MDL Expert

    Mar 7, 2014
    1,368
    516
    60
    use "setup /installfrom:s:\vista.esd"
     
  5. generalmx

    generalmx MDL Novice

    Apr 15, 2014
    34
    20
    0
    What I don't understand is that if we're using the Win8 Setup, wouldn't that load in a Windows 8 Bootloader and change other things the "Windows 8 Way", or is that setup information in the image its using? I'm sure there's various differences between the setup procedures. Would I need any of those extra files from the "sources" directory on a Windows 7 ISO, or just the install.wim?
     
  6. shukree

    shukree MDL Novice

    May 12, 2011
    11
    0
    0
    #6 shukree, Sep 23, 2014
    Last edited: Sep 23, 2014
    even if it used win8 or win8.1 bootloader there is no harm , because they are more sophisticated and you will notice that the first stage of copying (Getting files ready versus Expanding ..files ) is more speedy.
    you need just install.wim , unless you have extra things like $OEM$ folder or other specific things.
     
  7. spreizu

    spreizu MDL Novice

    Jun 7, 2013
    4
    0
    0
    #7 spreizu, Sep 25, 2014
    Last edited by a moderator: Apr 20, 2017
    I was facing the same problem recently and here's what I came up with:
    1. Use murphy78's Apply Image Script
    2. Modify it slightly to allow user to select which OS he/she would like to install

    Add another variable to "set some defaults" section
    Code:
    SET WINIMAGE=""
    Add the following code BEFORE :SCANIMAGES
    Code:
    :: Let user choose Operating System Version
    ECHO.
    ECHO.  ÉĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶ»
    ECHO.  ŗ                          SELECT OPERATING SYSTEM                         ŗ
    ECHO.  ŗÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŗ
    ECHO.  ŗ                                                                          ŗ
    ECHO.  ŗ 1. Windows 7 Service Pack 1                                    32/64-bit ŗ
    ECHO.  ŗ 2. Windows 8.1 Update 1                                        32/64-bit ŗ
    ECHO.  ŗ                                                                          ŗ
    ECHO.  ČĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶĶ¼
    ECHO.
    choice /c 12 /n /m "Choose a menu option: "
    SET ERRORTEMP=!ERRORLEVEL!
    IF !ERRORTEMP! EQU 1 (GOTO :SELECTWIN7)
    IF !ERRORTEMP! EQU 2 (GOTO :SELECTWIN8)
    
    
    :SELECTWIN7
    SET WINIMAGE=7
    GOTO :SCANIMAGES
    
    
    :SELECTWIN8
    SET WINIMAGE=8
    GOTO :SCANIMAGES
    
    Modify :SCANIMAGES section to support our selection thingy
    Code:
    FOR %%i IN (Z Y X W V U T S R Q P O N M L K J I H G F E D C B A) DO (IF EXIST "%%i:\Sources\install_%WINIMAGE%.wim" SET INSTALLIMAGE="%%i:\Sources\install_%WINIMAGE%.wim"&GOTO :SETUPCHECK)FOR %%i IN (Z Y X W V U T S R Q P O N M L K J I H G F E D C B A) DO (IF EXIST "%%i:\Sources\install_%WINIMAGE%.esd" SET INSTALLIMAGE="%%i:\Sources\install_%WINIMAGE%.esd"&GOTO :SETUPCHECK)
    FOR %%i IN (Z Y X W V U T S R Q P O N M L K J I H G F E D C B A) DO (IF EXIST "%%i:\Sources\install_%WINIMAGE%.swm" SET INSTALLIMAGE="%%i:\Sources\install_%WINIMAGE%.swm"&SET SPLIT=1&SET SPLITPATTERN="%%i:\Sources\install_%WINIMAGE%*.swm"&GOTO :SETUPCHECK)
    
    Save & test! Feel free to modify this code to suit your needs (add Vista, etc.)

    Edit: You can also add multiple $OEM$ folders to Sources directory ($OEM_7$ for Windows 7 and $OEM_8$ for Windows 8 in my example)
    To do that, modify :OEMFOLDERCOPY section
    Code:
    :: Copy OEM folders
    :OEMFOLDERCOPY
    SET OEMFOLDER=""
    FOR %%i IN (Z Y X W V U T S R Q P O N M L K J I H G F E D C B A) DO (IF EXIST %%i:\Sources\$OEM_%WINIMAGE%$\ SET OEMFOLDER=%%i:\Sources\$OEM_%WINIMAGE%$)
    IF NOT EXIST %OEMFOLDER% GOTO :RECOVERYPARTITIONSETUP
    IF EXIST %OEMFOLDER%\$$\ (xcopy %OEMFOLDER%\$$\* Z:\Windows\ /cherkyi)
    IF EXIST %OEMFOLDER%\$1\ (xcopy %OEMFOLDER%\$1\* Z:\ /cherkyi)
    
     
  8. generalmx

    generalmx MDL Novice

    Apr 15, 2014
    34
    20
    0
    Wait, what problem were you facing exactly? Since the previous posters said it's no problem to use Windows 8 Setup to install Windows 7 or Vista...

    As for murphy78's script, I actually have an AutoIt version with a GUI that I've been sitting on and left partially unfinished.
     
  9. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    6,787
    10,365
    210
    #9 murphy78, Sep 27, 2014
    Last edited by a moderator: Apr 20, 2017
    Actually, all you need to do is use the win8 files and replace the install.wim with an install.esd of indexes exported to recovery compressed esd format.
    For win7 standard x64 image it would be something like this:
    Code:
    for /l %x in (1,1,4) do (dism /export-image /sourceimagefile:c:\win7\sources\install.wim /sourceindex:%x /destinationimagefile:c:\win8shell\sources\install.esd /compress:recovery)
    if exist c:\win8shell\sources\install.wim del /q c:\win8shell\sources\install.wim>NUL 2>NUL
    rd /q/s c:\win8shell\sources\sxs\>NUL 2>NUL
    oscdimg -bootdata:2#p0,e,bc:\win8shell\boot\etfsboot.com#pEFc:\win8shell\efi\microsoft\boot\efisys.bin -lYourLabelHereMax32Chars c:\win8shell\ c:\temp\win7esd-filename.iso
    Note that if you use that as a script you'd need to change the %x calls to %%x since the interpreter eats a %

    You'd probably also need to add a generic ei.cfg that was something like:
    Code:
    [channel]
    Retail
    If you didn't do that it'd nag you for a key during setup.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. spreizu

    spreizu MDL Novice

    Jun 7, 2013
    4
    0
    0
    I also wanted to use ESD files to fit multiple OS install images to my 16GB USB stick. As for why I used murphy78's script, is that I found that the script works flawlessly (using Windows 8.1's PE) and by adding the code I posted above I can actually manage my install images separately (no need to add them to a single image). Sorry if I misunderstood your problem. :)
     
  11. HALIKUS

    HALIKUS MDL Addicted

    Jul 29, 2009
    527
    369
    30
    #11 HALIKUS, Sep 27, 2014
    Last edited by a moderator: Apr 20, 2017
  12. generalmx

    generalmx MDL Novice

    Apr 15, 2014
    34
    20
    0
    #12 generalmx, Sep 28, 2014
    Last edited: Sep 28, 2014
    (OP)
    Thanks everyone for the clarifications :)

    Hmm, but wouldn't using "setup /installfrom:s:\vista.esd" be a little easier? I mean, if you hadn't already gone through the trouble of modifying the script. For my purposes, this is a UEFI MULTIBOOT tool designed for technicians I plan on releasing to the Internets and for use at a computer shop I help out at, where some of the employees barely know what DOS is and couldn't figure out WinNTSetup3 --- they're still installing using DVDs; different strokes for different folks, of course.

    @HALIKUS - I'm just dealing with an indie repair shop, so no use for installing license files except for within the $$OEM$$. I've seen your tool before and indeed it looks awesome and powerful. What my AutoIT script is so far is just a dumb GUI wrapper for the related commands needed from DISKPART to setup the partitions & volumes, and then use dism to apply the image. I didn't find a good interface in AutoIT to the disk statistics, and as I don't want to rely on something like WMIC (which may not be in the PE), it just makes and reads temporary text files.

    PS: Darn post limit, saying I have my quoting of HALIKUS counted as a link when the quote didn't have one.