none
Unattended Install Issue RRS feed

  • Question

  • I am having an issue, basically the situation is this; I have a USB drive trying to do an unattended install from that.  So most everyone has this unattended install down to a science (as far as the parameters for the Image Configuration Editor is concerned).  My answer file, aside from it being personalized, is just like those examples.  However if I use a USB drive to install, it makes it to the first part of installation and then needs to reboot, I guess just before the generalize phase.  That's the problem though.  I want it to shutdown so I can truly leave the room and not have to worry about waiting there for me to pull out the USB in that "split second" when it is rebooting.  Because if I don't it starts back up again and runs through that initial stage of installation creating a perfectly broken endless cycle of pre-installation.  Setting the obvious Restart setting in the WindowsPE phase to Shutdown of course does nothing so no help there...  Any help would be just great guys!
    Monday, November 29, 2010 8:28 PM

Answers

  • Before we get into fixing the /noreboot flag, I just remembered another workaround someone else on the forum uses. One option is to remove one of the settings you specified in your answer file, for example the EULA accept setting. In this way, you plug in your USB drive, start the computer, accept EULA, then everything else is completely unattended. Once setup is finished, it'll reboot and ask you to accept the EULA again, at which point you can take out the USB drive, restart and continue the installation from the hard drive.

    Getting /noreboot to work:

    Adding the command to AutoRun.inf won't work due to the way setup is architectued. When you boot from DVD/USB, the WinPE operating system is loaded, which completely ignores normal autorun commands. You'll need to inject that command in another place to get this working. That process is quite a bit more complicated though, so we should make sure the /noreboot flag works on your computer (and your device isn't behaving strangely for some reason) before you go that route.

    To test out the /noreboot flag, rename your AutoUnattend.xml file to something else like myunattend.xml so that IBW won't automatically pick it up and start installing. Boot into the USB drive and click the "Launch WinPE Command Prompt" link. Type setup.exe /noreboot /unattend:myunattend.xml. Setup should install your answer file, then exit setup but not reboot. If that works, proceed below to how to make this automated. If your device still reboots, then something strange is happening.

    To get /noreboot working automatically, you'll need to modify the WinPE OS that IBW runs on top of. When WinPE loads, it normally just runs IBW, so you'll want to change it to run IBW with the /noreboot flag.

    IBW's WinPE WIM is located under \sources\boot.wim. You can use the commands in the ICE help topic "Add an Application to a Windows PE Image" to mount IBW's WinPE WIM, the modify it and commit it. Point the /WimFile command to <yourIBWFolder>\sources\boot.wim and the /index you want is 2.

    Once you have the WinPE OS mounted, use the ICE help topic "Include a Custom Script in a Windows PE Image" to add a command to launch setup.exe /noreboot /unattend:myunattend.xml.

    Let me know if that helps!

    • Marked as answer by Liandoray Thursday, May 19, 2011 6:57 PM
    Wednesday, December 1, 2010 6:38 PM
  • Ok, I got it!!  You make a Winpeshl.ini file and call the cmd file that contains:

    @ECHO OFF

    IF EXIST d:\myunattend.xml d:\setup.exe /noreboot /unattend:d:\myunattend.xml

    IF EXIST c:\myunattend.xml c:\setup.exe /noreboot /unattend:c:\myunattend.xml

    wpeutil shutdown

    Runs the cmd file, suppresses the restart, shutsdown.  Completely unattended.  I can run a mile while this thing installs Windows 7 without touching a thing.  Sweet.  No cheep tricks.


    • Marked as answer by Liandoray Thursday, May 19, 2011 6:57 PM
    Thursday, May 19, 2011 6:56 PM

All replies

  • The easiest workaround is to set your BIOS to boot from hard disk first instead of from your USB drive. Most of the time, the BIOS will also have a key for you to select a device to manually boot from. Hit that key to boot into your USB drive, then let it boot into your hard drive once installation has finished.

    You can also manually run setup.exe and pass it the /noreboot flag:

    <DVDDrive>\setup.exe /noreboot /unattend:myanswerfile.xml

    A full list of setup flags is available by running setup.exe /?

    Monday, November 29, 2010 10:46 PM
  • Unfortunately that didn't work.  First off, proposed method won't fly because I will need to use the same USB drive to reinstall Windows without having to change the BIOS.  This is a true unattended install and reinstall.  The second method didn't work either.  I threw the command line in thee AutoRun.inf file and it didn't seem to have any effect.  It just ran through the process and then restarted at some point during the install causing it to start over again.  Unless I missed completely where I should have put that command script.
    Wednesday, December 1, 2010 1:56 PM
  • Before we get into fixing the /noreboot flag, I just remembered another workaround someone else on the forum uses. One option is to remove one of the settings you specified in your answer file, for example the EULA accept setting. In this way, you plug in your USB drive, start the computer, accept EULA, then everything else is completely unattended. Once setup is finished, it'll reboot and ask you to accept the EULA again, at which point you can take out the USB drive, restart and continue the installation from the hard drive.

    Getting /noreboot to work:

    Adding the command to AutoRun.inf won't work due to the way setup is architectued. When you boot from DVD/USB, the WinPE operating system is loaded, which completely ignores normal autorun commands. You'll need to inject that command in another place to get this working. That process is quite a bit more complicated though, so we should make sure the /noreboot flag works on your computer (and your device isn't behaving strangely for some reason) before you go that route.

    To test out the /noreboot flag, rename your AutoUnattend.xml file to something else like myunattend.xml so that IBW won't automatically pick it up and start installing. Boot into the USB drive and click the "Launch WinPE Command Prompt" link. Type setup.exe /noreboot /unattend:myunattend.xml. Setup should install your answer file, then exit setup but not reboot. If that works, proceed below to how to make this automated. If your device still reboots, then something strange is happening.

    To get /noreboot working automatically, you'll need to modify the WinPE OS that IBW runs on top of. When WinPE loads, it normally just runs IBW, so you'll want to change it to run IBW with the /noreboot flag.

    IBW's WinPE WIM is located under \sources\boot.wim. You can use the commands in the ICE help topic "Add an Application to a Windows PE Image" to mount IBW's WinPE WIM, the modify it and commit it. Point the /WimFile command to <yourIBWFolder>\sources\boot.wim and the /index you want is 2.

    Once you have the WinPE OS mounted, use the ICE help topic "Include a Custom Script in a Windows PE Image" to add a command to launch setup.exe /noreboot /unattend:myunattend.xml.

    Let me know if that helps!

    • Marked as answer by Liandoray Thursday, May 19, 2011 6:57 PM
    Wednesday, December 1, 2010 6:38 PM
  • The command works, but injecting it into the WinPE wim doesn't seem to take. I tried several different attempts, but my last effort seems to have me changing startnet.cmd with this line:

    wpeinit –setup.exe /noreboot /unattend:d:\myunattend.xml

    Where D is my USB drive.  The Win PE envoirment boots up normally, but doesn't seem to run the code.  It sits on the main screen where you can select, "Launch WIN PE Command" where I can enter exactly:

    setup.exe /noreboot /unattend:d:\myunattend.xml

    and it runs the file.  I'd like to then call wpeutil shutdown after that, which does not defeat my purpose or intent.  After the setup's reboot is repressed, then I would like to shut the system down.  True unattended, one USB installer/reinstaller at that point.  Why won't the line work with startnet.cmd?

    Tuesday, May 17, 2011 7:41 PM
  • Just don't accept the license agreement in the answer file.  You'll have to accept the license agreement to install but will pause on the license agreement following the reboot.  Not a great solution but works
    Tuesday, May 17, 2011 9:07 PM
  • I actually almost got it.  My startnet.cmd is suppose to run the this bat file that I made, but it doesn't.  I have to manually launch the Win PE command prompt.  The bat file works perfectly, exactly what I need it to do, but how do I load environment with the command prompt?
    Tuesday, May 17, 2011 9:19 PM
  • Can someone confirm with me that changing the startnet.cmd file to run a secondary .cmd file is the correct way to get the boot.wim to run my custom script, because as of right now, it doesn't seem to take.  But if I manually run the WinPE Command Prompt and simply type the name of the script, the install works exactly how I want it to.  I am literally looking to understand why altering my boot.wim's startnet.cmd has little to no affect when it tries to run.  Should I not be building my answer file through Create IBW Image from Answer File?
    Wednesday, May 18, 2011 7:33 PM
  • Ok, I got it!!  You make a Winpeshl.ini file and call the cmd file that contains:

    @ECHO OFF

    IF EXIST d:\myunattend.xml d:\setup.exe /noreboot /unattend:d:\myunattend.xml

    IF EXIST c:\myunattend.xml c:\setup.exe /noreboot /unattend:c:\myunattend.xml

    wpeutil shutdown

    Runs the cmd file, suppresses the restart, shutsdown.  Completely unattended.  I can run a mile while this thing installs Windows 7 without touching a thing.  Sweet.  No cheep tricks.


    • Marked as answer by Liandoray Thursday, May 19, 2011 6:57 PM
    Thursday, May 19, 2011 6:56 PM