1 2 3 4 Previous Next 54 Replies Latest reply on Apr 24, 2012 3:06 PM by BrentWalker

    Windows 7 Deployment with an answer file

    Apprentice

      Hello All

       

      I appologise if this has been asked before but I couln't find any sign of it.

       

      With XP when I created a unattended installation I used to put the sysprep.ini answer file in the C:\sysprep directory, when the PC booted for the first time this worked and took XP through all the neccesary steps for first time use.

       

      I have now created a answer file usings Windows System Image Manager but where do I place this file. Everywhere on the internet seems to point at putting it on the Root of a usb stick which is then plugged into a PC being imaged. For me this doiesnt sound right when you are running windows PE.

       

      Any ideas?

        • 1. Re: Windows 7 Deployment with an answer file
          EMiranda Expert

          there is a sysprep folder already in the following location:  %windir%\system32\sysprep

           

          place your xml file in there

           

          and to use it, run from the command line:

           

          C:\Windows\System32\sysprep> sysprep /oobe /generalize /unattend:"nameoffile".xml
          

           

           

          that is the normal way,  I think if you are using LANDesk HII you use /audit instead of /oobe

          1 of 1 people found this helpful
          • 2. Re: Windows 7 Deployment with an answer file
            Apprentice

            Cheers mate.

             

            I will try this today and feed back the results

            • 3. Re: Windows 7 Deployment with an answer file
              Employee

              Hi gporritt,

               

              EMiranda is exactly right that the sysprep folder is a valid location.  On Windows Vista/7 you also have the ability to copy it to the root of the OS drive.  That's what our OS Deployment tasks do.  Either one will (read: should) work, I just wanted to let you know the options you have.

               

              Thanks!

              • 4. Re: Windows 7 Deployment with an answer file
                Apprentice

                Hi Guys

                 

                I am having a little problem with this. When I run the command above I get the error:

                 

                System Preparation Tool 3.14

                A fatal error occurred while trying to sysprep the machine

                 

                Any ideas?

                • 5. Re: Windows 7 Deployment with an answer file
                  EMiranda Expert

                  you will have to check out the sysprep log files to see more information about what's going on:

                   

                  they are here:

                   

                  Generalize - %WINDIR%\System32\Sysprep\Panther

                  Specialize - %WINDIR%\Panther

                  Setup actions - %WINDIR%\Panther\Unattendgc

                  • 6. Re: Windows 7 Deployment with an answer file
                    Apprentice

                    Just a quick update to this. There appears to be a limit to the number of times that a sysprep can be perfomed now. The limit is 3.

                    • 7. Re: Windows 7 Deployment with an answer file
                      EMiranda Expert

                      gporritt wrote:

                       

                      Just a quick update to this. There appears to be a limit to the number of times that a sysprep can be perfomed now. The limit is 3.

                       

                      Yes, there is a 3 limit due to the rearm settings.

                       

                      I generally only use /oobe when the image is finished and ready for the end user.

                       

                      Here is my method I use for creating my master windows 7 image:

                       

                      • Create a Flat load of Windows 7
                      • After the Flat Load it will reboot and go to the Welcome Screen
                      • I do not go any further, instead hit CTRL + SHIFT + F3 (This will take you directly into audit mode, bypassing system setup and taking you to the OS as an administrator)
                      • From this point forward you will be audit mode, so now is when i make all my installations, updates, and configurations.
                      • Once I have finished making all my changes, I then capture the image while still in audit mode.  I name this image my non-sysprep or audit version
                      • After I have a captured audit version, I then run modify my sysprep.xml and sysprep the image with the /oobe /generalize /unattend:sysprep.xml switches
                      • Now you will only be on your 1st rearm and I test the image. 
                      • If there are problems with the image and i need to make config changes or updates.  I lay back down the audit version and make the changes and then sysprep again

                       

                       

                      This has been a successful approach for me so far.

                      • 8. Re: Windows 7 Deployment with an answer file
                        Apprentice

                        Thats great advice thanks. I have also discovered the rearm setting in the sysprep but I think your method is better.

                        • 9. Re: Windows 7 Deployment with an answer file
                          Rookie

                          Hello All,

                           

                          I have done all my necessary configurations in Audit mode but now when I run my sysprep it does not install all the necessary drivers.  What is the best way to get sysprep to install all drivers?  I have done some reading online and the auditSystem pass where you place driver paths is skipped during sysprep.

                          • 10. Re: Windows 7 Deployment with an answer file
                            Rookie

                            actually you can do the imaging without resorting to Audit mode!!!!

                             

                            you can use Microsoft's DISM.exe to enumerate the drivers..

                            I added a line to copy the dism stuff to my x:\windows\system32 (you need the dism.exe as well as the dism folder) (these files reside on any win7 system in system32)

                            and run: x:\windows\system32\dism.exe /image:c:\ /add-driver /driver:C:\Windows\LDDriverStore /recurse     after the image has been restored and the LD HiiCllient has been run.

                             

                            and presto…..no need for audit mode, also don’t need the line in the unattend.xml anymore that did this:

                            c:\windows\System32\sysprep\sysprep.exe /oobe /generalize /unattend:c:\windows\panther\unattend.xml /reboot

                            • 11. Re: Windows 7 Deployment with an answer file
                              EMiranda Expert

                              i use similar approach to Steve's method. I don't like the extra reboots that sealing the image in /audit mode causes.

                               

                              I use pretty much the same method as steve except I use the driver utility dpinst.exe instead of dism.exe.  But they pretty much do the same thing

                              • 12. Re: Windows 7 Deployment with an answer file
                                Rookie

                                Thanks, for the informatin Steve and Emiranda.  Right now we are slowing down our Win 7 migration as we have a lot of other projects going on, but as soon as I get a chance to start back with Win 7 I will try this approach.  Thanks again.

                                • 13. Re: Windows 7 Deployment with an answer file
                                  Rookie

                                  Hi,

                                   

                                  Im having trouble getting my drivers to enumerate.  I have captured my image both with /oobe and /audit depending on which of the above methods Im using.  I use ImageW to image and restore.  The image deploys fine.  The drivers are injected fine but once windows starts up the drivers have not installed although they are in the LDDriverStore.  Could someone please explain to me what Im doing wrong.

                                   

                                  Other questions are....

                                   

                                  1) Should I been using generalize when I sysprep my image?

                                  2) When using the Dism.exe method I get an error that the image cannot be found  that the location is correct.

                                  3) Where in the sysprep.xml do you add the line c:\windows\System32\sysprep\sysprep.exe /oobe /generalize /unattend:c:\windows\panther\unattend.xml /reboot

                                   

                                   

                                  What is the correct procedure for imaging.when using the oobe and audit mode.  Does anyone have a good guide on this.  I cannot find any decent documentation and Windows 7 HII imaging with LANDesk.

                                   

                                  Any help would be really appreciated.

                                   

                                  Im going crazy here.

                                  • 14. Re: Windows 7 Deployment with an answer file
                                    EMiranda Expert

                                    I can only give you advice on how I do it, which is probably different than most people....but it works...so for now I'm sticking with it

                                     

                                     

                                    Here is what I do:

                                     

                                    • Create my image
                                    • I have a folder on my image called pnp, where I inject my drivers.  But the path to your drivers can be anywhere.
                                    • I also place the utility dpinst.exe and my dpinst.xml answer file in my image (which is part of the Windows Driver Kit (WDK)) which enumerutes drivers very well.  I like this utility cause you can supply a .xml file just like a sysprep answer file with your options.
                                    • Here is example of my dpinst.xml answer file which is basically a complete silient installation

                                     

                                    <?xml version="1.0" ?>
                                    <dpinst>
                                        <search>
                                          <subDirectory>*</subDirectory>
                                        </search>
                                        <language code="0x0409">
                                          <dpinstTitle>Driver Install Wizard</dpinstTitle>
                                          <welcomeTitle>Welcome!</welcomeTitle>
                                          <welcomeIntro>This utility is used to install device drivers.</welcomeIntro>
                                          <installHeaderTitle>Installing drivers...</installHeaderTitle>
                                          <finishTitle>Finished installing drivers.</finishTitle>
                                        </language>
                                        <deleteBinaries/>
                                        <quietInstall/>
                                        <suppressEulaPage/>
                                        <suppressWizard/>
                                        <scanHardware/>
                                    </dpinst>
                                    

                                     

                                     

                                    • I then seal my image with /oobe /generalize /unattend:%nameofanswerfile%.xml
                                    • Inside my sysprep answer file i have the following in the specialize path | x86_Microsoft-Windows-Deployment_neutral | RunSynchronous | RunSynchronousCommand[Order="1"]
                                    • Command I run is c:\drivers\dpinst.exe /path %pathtodrivers%

                                     

                                    crop.png 

                                     

                                    And that is it...during sysprep  windows will do its own pnp and then after that it will start going through the RunSynchronous commands at which it will run the dpinst.exe utility and enumerate any drivers it didnt find pointing to the path of your drivers folders

                                    1 2 3 4 Previous Next