12 Replies Latest reply on Jul 16, 2008 4:38 AM by jary.busato

    Sysprep and cmdlines.txt

    Rookie

       

      I am trying to run cmdlines.txt when using sysprep to install some drivers  but sysprep seems to reboot before these drivers are installed. When I look  in the setupact.log I can see each setup.exe I am trying to run with an Exit  code of 0 which I believe mean successful but the drivers don't get  installed. I can tell the drivers are not being installed because the mini  setup run through so fast. Sysprep Unattended section looks like: DriverSigningPolicy=Ignore OemSkipRegional=1 OemSkipEula=Yes OEMSkipWelcome=1 InstallFilesPath=C:\sysprep\i386 TargetPath=\WINDOWS Contents fo cmdlines.txt "c:\drivers\Chipset\setup.exe -s" "c:\drivers\amtheci\setup.exe -s" "c:\drivers\amtsol\setup.exe -s" "c:\drivers\Video\setup.exe -s" "c:\drivers\Audio\setup.exe -s" "c:\sysprep\sysprep.exe -clean -quiet"

       

       

       

       

       

      Thank for any help,

       

       

      Jerry

       

       

        • 1. Re: Sysprep and cmdlines.txt
          zman Master

          Hard to read the post try using the  tag around the sysprep unattended text. My first thoughts are that one of your setup.exes (driver setups) are rebooting. Also make sure that  a folder named $oem$ is in C:\sysprep\i386 and Cmdlines.txt file is in this folder.  Also does "c:\sysprep\sysprep.exe -clean -quiet" need to be in cmdlines.txt?

           

          • 2. Re: Sysprep and cmdlines.txt
            Rookie

             

            I hope this one is more readable. I don't think that one of the drivers is rebooting the system because I can see all drivers in the setupact.log one after the other with the exit code 0. I also tried running them from a batch files with each line starting with a start /wait before the setup.exe. I tried this batch file manually and it ran fine but not during sysprep.

             

             

            I am trying to run cmdlines.txt when using sysprep to install some drivers

            but sysprep seems to reboot before these drivers are installed. When I look

            in the setupact.log I can see each setup.exe I am trying to run with an Exit

            code of 0 which I believe mean successful but the drivers don't get

            installed. I can tell the drivers are not being installed because the mini

            setup run through so fast.

             

            Sysprep Unattended section looks like:

            Unattended

            DriverSigningPolicy=Ignore

            OemSkipRegional=1

            OemSkipEula=Yes

            OEMSkipWelcome=1

            InstallFilesPath=C:\sysprep\i386

            TargetPath=\WINDOWS

             

            Contents fo cmdlines.txt

            Commands

            "c:\drivers\Chipset\setup.exe -s"

            "c:\drivers\amtheci\setup.exe -s"

            "c:\drivers\amtsol\setup.exe -s"

            "c:\drivers\Video\setup.exe -s"

            "c:\drivers\Audio\setup.exe -s"

            "c:\sysprep\sysprep.exe -clean -quiet"

             

             

            • 3. Re: Sysprep and cmdlines.txt
              Fabian Schmidt Expert

               

              Hello,

               

               

              try the following:

              Inside the $OEM$ Folder create a $1 Folder underneath that a DRIVERFOLDER and copy all your drivers to this subfolder. Therefor you should extract the original Setup Files.

               

               

              In your sysprep.inf within the unattend section after UnattendSwith=Yes add the following line: OemPnPDriversPath=DRIVERFOLDER\Name

              This line assigns the minisetup to search for drives within these folders.

              Also it is necessary that the DriverSigningPolicy= must be set to Ignore.

               

               

               

               

               

               

               

               

              Greets

               

               

              • 4. Re: Sysprep and cmdlines.txt
                leffrt SupportEmployee

                 

                You didn't answer a very important question that zman asked:

                 

                 

                 

                 

                 

                "Also make sure that  a folder named $oem$ is in C:\sysprep\i386 and Cmdlines.txt file is in this folder. "

                 

                 

                 

                 

                 

                Make sure you check this.

                 

                 

                 

                 

                 

                 

                 

                 

                • 5. Re: Sysprep and cmdlines.txt
                  Jared Barneck SupportEmployee

                  When I look in the setupact.log I can see each setup.exe I am trying to run with an Exit code of 0 which I believe mean successful but the drivers don't get installed.

                   

                  So according to this, the setup.exe's are running...which means everything is probably where it should be.  So the setup.exe files are not running.  Can you pass an additional switch other than /s, say a logging switch, so you can see what is going on?  Or try running them like this:

                   

                  "cmd /c c:\drivers\Chipset\setup.exe -s"
                  "cmd /c c:\drivers\amtheci\setup.exe -s"
                  "cmd /c c:\drivers\amtsol\setup.exe -s"
                  "cmd /c c:\drivers\Video\setup.exe -s"
                  "cmd /c c:\drivers\Audio\setup.exe -s"
                  "cmd /c c:\sysprep\sysprep.exe -clean -quiet"

                   

                  • 6. Re: Sysprep and cmdlines.txt
                    zman Master

                    Agree with rhyous, remove the -s and see if they are actually running....

                     

                     

                     

                     

                     

                    Also still not sure why

                    "c:\sysprep\sysprep.exe -clean -quiet" is in there....

                    • 7. Re: Sysprep and cmdlines.txt
                      CraigMiddelstadt Master

                      If it is rebooting before the drivers are getting installed, then call the drivers from the Sysprep.inf file, add a GuiRunOnce section like this:

                       

                      GuiRunOnce

                      "cmd /c
                      Olddog\w2k3SEr2\I386\cd2\CMPNENTS\R2\SETUP2.EXE /q /a"

                       

                      I would use the OemPnpDriversPath section for the plug and play drivers and the GuiRunOnce section non plug and play.

                       

                      OemPnpDriversPath=dell\Broadcom;dell\Intel;dell\MRAID;dell\PERC4IM;dell\PERC5;dell\SAS5

                      • 8. Re: Sysprep and cmdlines.txt
                        Rookie

                         

                        Thanks for all the suggestions and I think I am getting closer. I should let you know I am trying to setup HII following the pdf from dropped packet. I think I narrowed down the issue now. It seems when I have the ldprep utility running in my script is when I start having problems. I removed the ldprep lines from my script and all the drives in cmdlines.txt ran fine. The ony hardware that did not load was the nic drivers which has an inf file for silent install and I didn't have in the cmdlines.txt file. Also when the ldprep was running it appears that the video and sound drivers where loading. These also had inf files so I may not need them in cmdlines.txt.  It was the chipset drivers that aren't loading and there are no inf files for the chipset.   I will keep testing and try to figure out why I am having conflict between ldprep and cmdlins.txt.

                         

                         

                         

                         

                         

                        Jerry

                         

                         

                         

                         

                         

                         

                         

                         

                        • 9. Re: Sysprep and cmdlines.txt
                          Rookie

                           

                          I got this narrowed down to this:

                           

                           

                          When I remove all may apps from GuiRunOnce everything works fine. What I am seeing is that after the minisetup runs and reboot the Found New Hardware Wizard pops up. If there is nothing in the GuiRunOnce  the Found New Hardware Wizard flashes for a little while and then goes away and the pc reboots and everything is fine. I assume the flashing is just pnp doing its think.

                           

                           

                          When I have apps to install in GuiRunOnce the Found New Hardware Wizard doesn't flash or go away. I seems that once GuiRunOnce starts it takes over the pc and the pnp doesn't continue. I tried setting ldsleep to 3 minutes and tried a batch file that had a ping command that waited 1 minute but the Found New Hardware Wizard still doesn't continue. So after the final boot the Found New Hardware Wizard still comes up but can't find the hardware on its own. The last driver that seems to be having the issue is the SM Bus Controller I got everything else working.

                           

                           

                          I wonder if I should just move some of the hardware drivers that don't have inf file from the cmdlines.txt to the GuiRunOnce section. I thing it  would better to have all my hardware loaded before installing the apps but maybe I have no choice.

                           

                           

                           

                           

                           

                          • 10. Re: Sysprep and cmdlines.txt
                            zman Master

                             

                            Hmmm, that is weird I thought GuiRunOnce only ran after the setup and when the user logs in???? Anywho, apparently there van be issues with GuiRunOnce:

                             

                             

                             

                             

                            • If an application requires a Windows Explorer shell to install, the GuiRunOnce section will not work because the shell is not loaded when the Run and RunOnce commands are carried out.

                            • Applications that use the same type of installation mechanism might not run properly if a /wait command is not used.  Exes that spawn other processes.

                             

                             

                             

                             

                             

                             

                            I would put all those apps you are running in a batch file and just run the batch file to see if that is the problem.

                             

                             

                            Start /wait <path>\<Setup> <command line parameters>

                             

                             

                            Start /wait <path>\<Setup> <command line parameters>

                             

                             

                             

                             

                             

                            You could move the drivers to  guirunonce if they are not imperative to the system booting correctly or not needed until after the first login (synaptics pointer drivers).

                             

                             

                             

                             

                             

                             

                             

                             

                            • 11. Re: Sysprep and cmdlines.txt
                              technobabble Apprentice

                               

                              I didn't see mention of this in the thread so I thought I would mention it.

                               

                               

                              When using the $OEM$ folder and it's subfolders to copy

                              files to the target PC, you have to include the OemPreinstall=Yes

                              line in the unattend.txt file under the section.

                               

                               

                               

                               

                               

                              \$OEM$

                              Holds all folders and files for an unattended

                                             installation.  Also, Cmdlines.txt, and files it references,

                                             are put in this folder.

                              \$OEM$\Textmode

                              Contains updated mass storage drivers and HAL

                                             files required during the text-mode portion of Setup.

                              \$OEM$\$$

                              Contains files that Setup copies to the %Windir%

                                             (e.g., C:\winnt or C:\Windows) folder during installation.

                              \$OEM$\$$\Help

                              Contains custom Help files that Setup copies to

                                             the %Windir%\Help folder during installation.

                              \$OEM$\$$\System32

                              Contains custom Help files that Setup copies to

                                             the %Windir%\System32 folder during installation.

                              \$OEM$\$1

                              Represents the root of the drive on which you

                                             install WinXP (usually C:\) and contains any files that Setup

                                             should copy to the boot partition during installation.

                              \$OEM$\$1\Pnpdrvs

                              Contains new or updated PnP drivers. The user

                                             specifies the folder name in the unattend.txt file used during

                                             unattended installations. For example, this folder might be

                                             named \$OEM$\$1\Pnpdrvs.

                              \$OEM$\$1\SysPrep

                              Contains files that Setup uses for the Sysprep-based

                                             method of installation.

                              \$OEM$\drive_letter

                              Represents the root of a particular volume on

                                             the system (e.g., \$OEM$\C represents the C: drive) and contains

                                             any files that WinXP Setup should copy to this partition during

                                             installation.

                              \$OEM$\drive_letter\subfolder

                              Represents a particular subfolder of the drive

                                             (e.g., \$OEM$\C\MyFolder) and contains any files that Setup

                                             should copy to the subfolder during installation. Multiple instances

                                             of this type of folder can exist under the \$OEM$\drive_letter

                                             folder.

                               

                              • 12. Re: Sysprep and cmdlines.txt
                                Apprentice

                                I think you should:

                                1) use programs like driverguide toolkit to extract drivers from setup.exe.

                                2) use ldprep to let minisetup know where drivers are stored.

                                 

                                HTH

                                 

                                Jary