Multiple Unattended Answer Files

Discussion in 'Windows 8' started by Papus96, Oct 11, 2012.

  1. Papus96

    Papus96 MDL Novice

    Sep 1, 2009
    16
    0
    0
    Hi Guys,

    I have my Win8 with all the tools/programs to auto install from DVD/USB and would like to choose from multiple answer files, how can this be achieved? Lets say - option to choose from regular, audit and customized.

    Testing Anarethos, Mr Jinge and my custom files and would like to have all this on one USB key. Changes are a lot easier from usb key. Just need a simple boot menu pointing to the answer file for a particular Win8 install.


    Thanks!!
     
  2. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,530
    652
    60
    #2 Flipp3r, Oct 11, 2012
    Last edited by a moderator: Apr 20, 2017
    The easiest for me is to boot to WinPE and run the setup from command prompt.
    My USB key has both 32 & 64bit WinPE.
    Here is my BIOS_Install_Win8_Pro.cmd contents:

    Code:
    @echo off
    Title Installing Windows 8 Pro BIOS Mode
    set PTH=%~dp0
    DiskPart /s %PTH%Files\CreatePartitions-BIOS.txt
    if %processor_architecture% == AMD64 \Source.x64\setup /unattend:%PTH%Files\Unattend_Win8_Pro-BIOS.xml
    if %processor_architecture% == x86 \Source.x86\setup /unattend:%PTH%Files\Unattend_Win8_Pro-BIOS.xml
     
  3. Papus96

    Papus96 MDL Novice

    Sep 1, 2009
    16
    0
    0
    Flipp3r, thanks for replying back but i'm looking more in the lines of having 6 answer files at boot prompt:

    1 - x86 Standard
    2 - x86 Audit
    3 - x86 Customized
    4 - x64 Standard
    5 - x64 Audit
    6 - x64 Customized

    Choose option and run setup, I know winpe is nice but I wan't a more direct approach. Just so you know, my Wim image has all versions so its up to me to choose the correct answer file at boot prompt.

    Thanks!!
     
  4. urie

    urie Moderator
    Staff Member

    May 21, 2007
    8,710
    3,069
    300
    @ Flipp3r, you do not need two files x86 and x64 can be combined :rolleyes:
     
  5. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,530
    652
    60
    #5 Flipp3r, Oct 12, 2012
    Last edited: Oct 12, 2012
    Not sure what you mean. Unattend_Win8_Pro-BIOS.xml is combined with x86 & x64.
    If I boot 32bit WinPE, the x86 edition is installed, boot 64bit WinPE & x64 is installed...
    Or do you mean combining the Install.wim's to 1 container? Nah, not interested in an all-in-1...

     
  6. urie

    urie Moderator
    Staff Member

    May 21, 2007
    8,710
    3,069
    300
    Yes I meant if using an AIO
     
  7. Papus96

    Papus96 MDL Novice

    Sep 1, 2009
    16
    0
    0
    Ok, i'm going the winpe boot rout. Modifying boot.wim index 2 and adding winpeshl.ini with instructions to run a batch file from root of USB stick, i'm stuck creating a simple batch menu with options and choices. This is what I have in mind:

    Menu:
    [1] CUSTOM_x86
    [2] AUDIT_x86
    [3] CUSTOM_x64
    [4] AUDIT_x64
    [0] None (don't use an answer file)

    When selecting an option execute something like this:
    X:\sources\setup.exe /unattend:%answ%

    Any help would be really appreciated in creating this simple menu.
     
  8. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,530
    652
    60
    It's easy to make a frontend menu.exe with autoit but how would you find the drive letter of your usb key? X: is your WinPE ramdrive, your source\install.wim is on another drive letter.
    I tried searching for my key & it did find the drive letter & all worked, until I tried it on a system with a card reader. If you seek the drive that's a card reader then you get prompted to retry/continue/cancel.
    I gave up on the idea... Maybe someone here knows how to do it?

     
  9. HALIKUS

    HALIKUS MDL Addicted

    Jul 29, 2009
    527
    369
    30
    #9 HALIKUS, Oct 13, 2012
    Last edited by a moderator: Apr 20, 2017
  10. Papus96

    Papus96 MDL Novice

    Sep 1, 2009
    16
    0
    0
    HALIKUS.
    I'm away from my testing computer until Monday, but I'll try your suggestion. Right now, when I select my xml files when setup runs I get an error xml not found. My xml files are in root inside xml folder, maybe i need to move these outside the folder.

    Thanks!!
     
  11. Papus96

    Papus96 MDL Novice

    Sep 1, 2009
    16
    0
    0
    I did what HALIKUS suggested and it didn't work, here's what I have:

    winpeshl.ini (inside boot.win>>windows>>system32):
    [LaunchApps]
    Run.cmd
    x:\setup.exe

    Startsetup.cmd (same location as winpeshl.ini):
    @echo off
    title Scanning...
    set marker=Run.cmd
    for %%I in (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:\%marker% set StartSetup=%%I:\Run.cmd & goto :strt
    echo.
    echo FILES NOT FOUND, EXITING...)
    pause
    exit

    :strt
    %StartSetup%
    exit

    Run.cmd (in root of USB key):
    @echo off
    title Windows 8 AIO Setup

    set answ=none

    cls
    echo [X:] [ ANSWER FILES ]
    echo.
    echo 1) Customized_x86
    echo 2) Audit_x86
    echo 3) Customized_x64
    echo 4) Audit_x64
    echo 0) none (don't use an answer file)
    echo.
    set /P slct= Select:
    if "%slct%"=="1" set answ=X:\Sources\Customized_x86.xml & goto :unstp
    if "%slct%"=="2" set answ=X:\Sources\Audit_x86.xml & goto :unstp
    if "%slct%"=="3" set answ=X:\Sources\Customized_x64.xml & goto :unstp
    if "%slct%"=="4" set answ=X:\Sources\Audit_x64.xml & goto :unstp
    if "%slct%"=="0" set answ=none & goto :rnstp
    echo.

    :rnstp
    cls
    echo.
    echo Answer file: [ %answ% ]
    if not "%answ%"=="none" goto :unstp
    X:\sources\setup.exe
    exit

    :unstp
    cls
    echo.
    X:\sources\setup.exe /unattend:%answ%
    exit

    pause

    All the xml's inside x:\sources\

    When I boot I get to the menu but when I select and continue I get the following error message inside "setup is starting" screen: "Windows could not parse or process unatend answer file [x:\Audit_x86.xml].

    Looks like its not finding in the right drive letter the answer file, any ideas?

    Thanks!!
     
  12. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,530
    652
    60
    #12 Flipp3r, Oct 16, 2012
    Last edited by a moderator: Apr 20, 2017
  13. Papus96

    Papus96 MDL Novice

    Sep 1, 2009
    16
    0
    0
    #13 Papus96, Oct 16, 2012
    Last edited: Oct 16, 2012
    (OP)
    Finally!! Got it to work, a few tweaks to my run command and presto - it works. Was missing the following command in my Run.cmd:

    for %%i in (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:\USBMultiWIMSetup.cmd set USBKEY=%%i:
    echo Found USB Installation source as drive %USBKEY%

    I'll post later my complete results.

    Note: credits to POMAH-PRESS for the original scripts designed for Win7. Found these online and tweak to my specific needs.

    Thanks!!