1 2 3 Previous Next 113 Replies Latest reply on Nov 21, 2011 7:01 AM by EMiranda

    Dealing with setup based drivers in HII

    Spartan Apprentice

      Good Day,


      My I have modified my original topic as this discussion took a way different direction, as I found the script posted below by Silvercoupe very helpful I thought I would change the tags so it could easily be found my others in the Community.


      In Summery the VB Script identifies the Model and OS of the machine and allows you to run commands based on these findings.

      You could then do things like download drivers (or anything else) from a network share and run the appropriate commands to set them up.


      He evens allowed for groupings in the event that you might have a series of items common to a line of machines (which makes maintenance a little easier).


      NOTE:  The script (in its current form) does not provide feedback so make sure you type in commands carefully!



      Thanks again Silvercoupe


      Message was edited by: Doc

        • 1. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2


          1 of 1 people found this helpful
          • 2. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2
            Spartan Apprentice



            In the past (LDMS 8.8) I have used the tool found Hardware Independent Imaging using LANDesk OSD - rev 9.1 but over the Summer in LDMS 9.1 I had mixed results with it.

            I'll see how it works now in SP2 using this process (as it is super simple to use) but if it does not work your VB Script looks quite promising.  =o)

            • 3. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2

              In 8.8 I used all of Jan Beulens' recommendations and everything worked great.  When we went to LD9, I was really hoping to see the ability to run driver installations added to the built-in HII tools that come with the suite.  This didn't happen so I decided to strip everything out and create my own scrupt using case statements.  It works great and is nice and flexible.  I only use LANDesk HII in LD9 to inject the Mass Storage and NIC drivers as these tend to be widely used throughout different models and don't require a setup program.


              Once you have the basics in the VBS, you're only modifying a few line items here and there.  The GUI tools and AutoIT scripts are nice, don't get me wrong.  This is just my preferred method.

              • 4. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2
                Spartan Apprentice

                Hi Silvercoupe,


                I'm playing around with your VBS which works rather well with my Dell Laptops but I ran into a snag with one of our other more generic models.


                At a command Promt I run "wmic csproduct get name" which bring up E10IS2 (Which is the same as System.Model in the LDMS Inventory)

                But when I run the script it pauses for a sec and finishes without downloading anything.


                When I run it on my Dell "Latitude E6410" it work just fine so the script is doing it's job.

                Both Systems are using the same core Widows 7 32bit image.

                Both paths (I:\2GO-PC and I:\E6410) are valid.


                Sub Win7ModelSelect
                Select Case Model
                Case "Latitude E6410"
                  WSHShell.Run "xcopy /c /q I:\E6410 c:\Setup /E /S /I", 1, True
                  WSHShell.Run "c:\Setup\AUDIO\setup.exe -s", 1, True
                Case "E10IS2"
                  WSHShell.Run "xcopy /c /q I:\2GO-PC c:\Setup /E /S /I", 1, True
                  WSHShell.Run "c:\Setup\Audio\setup.exe -s", 1, True
                  WSHShell.Run "c:\Setup\Video\setup.exe -s", 1, True
                  WSHShell.Run "c:\Setup\Chipset\setup.exe -s", 1, True
                  WSHShell.Run "C:\Windows\System32\msiexec.exe /i c:\Setup\DCP\setup.msi /qn /noreboot", 1, True


                Could I please ask you for any tips you might have?


                Thanks again!

                Very nice script BTW.


                Message was edited by: Doc

                • 5. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2

                  Hey Doc,


                  Glad to hear the Latitude is working OK.  This tells us the script is, indeed, doing it's job but there might be a model detection issue.  For testing, add msgbox model into the script after this For entry:


                  For Each objItem in colItems
                  Model = objItem.Model

                  msgbox model


                  This is a visual of what's being reported for the model by WMI.  Maybe it will shed some light on why the commands aren't running.  Whatever is reporting in the message box is exactly what needs to be in the case statement.  I have seen on several of our older machines that there are trailing "spaces" after the model number.  My script doesn't account for these, but LANDesk strips out any trailing spaces in the Inventory records so you wouldn't be able to tell without running this script yourself.  I added another character to verify there were spaces in some of our models, something like:


                  msgbox model & "end"


                  This will display the model as it is in the BIOS and then the word end with no spaces.  If you see spaces between the model and the word "end" in the message box then you know there are hidden spaces in the model info.  I thought about modifying the script to account for this, but haven't gotten around to it.


                  If your model is truly being detected properly, look at your line items in the case statement.  I noticed your calling MSIEXEC to run another EXE.  This shouldn't be necessary.  Just call the EXE with the correct MSI switches, like /quiet /noreboot etc.  It should work OK.  If the xcopy path is valid, double-check it or maybe alter the path so there's no special characters etc., basically make it easier on yourself.


                  Lemme know how testing goes.

                  • 6. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2
                    Spartan Apprentice

                    Looks like I have a whole wack of spaces after the model name.  =o/

                    The example above was supposed to be an MSI my bad.


                    I tried adding a space and re-running about 10 times now... Not sure how many spaces they have but I'll keep trying.


                    Thanks again for the help!

                    • 7. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2



                      Dunno why I didn't do this before, but modify the "model" section of the script with RTrim like follows:


                      For Each objItem in colItems
                      Model = RTrim(objItem.Model)


                      This will remove any trailing spaces from your model info.  Rest of the script should work fine after that.  Enjoy. 

                      • 8. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2
                        Spartan Apprentice

                        Worked like a charm!


                        Nicely done!

                        • 9. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2

                          Silvercoupe .. great job with the script .. worked out real nice!


                          Quick question .. i added this script to my sysprep.inf file (XP imaging) under the GUIRunOnce section and it kicks off as expected as soon as mini-setup finishes and the machine logs into Windows. I added a 10 minute wait so that it gives the provisioning template ample time to complete the setup based driver installs.


                          Is there a way to make this part of minisetup? How are you or anyone else who has tried this doing it?


                          We are on LDMS 9 (SP2) using provisioning based OSD.

                          • 10. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2



                            Glad it's working for you.  I used to do everything during Mini Setup in 8.8 using Jan Beulens stuff and the CMDLINES.TXT file in the i386 folder.  If you look at some of the older HII stuff from LANDesk docs you'll see what I'm talking about.  It worked great for a while.


                            The problem I ran into is that for newer machines, several of the installs would not install the hardware properly during mini setup and would only install if run under a specific user account, in our case the local admin account, during first logon.  So what I had to do was create an OSD script for every model we had in our environment so I could split out a few commands to run using the CMDLINES.txt file during mini-setup and then add the remaining commands in the sysprep.inf to run at first logon.  You can see how this quickly becomes inefficient.


                            I don't see why you couldn't use the same CMDLINES.TXT file to simply run the drivinst script I provided, but depending on the model you may run into the same issues I did with installs not going through correctly.  However, I had long since stopped using CMDLINES.txt since I started using the script so it may work just fine.  I went with VBS because that's what I was most familiar with and also because it's really easy to force the script to "wait" until the previous lines complete before running the next line.  That's what ",1 ,True" is at the end of each install is.  Just tells the VBS to wait to move on.


                            Give it a shot.  I'd be interested to know if it works out for you.

                            • 11. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2
                              Spartan Apprentice

                              Hi SQ,


                              Why not added this in the template? 

                              I do this right after installing the "provisioning" Agent then I reboot.


                              Otherwise you would have to set your wait to trigger based on a file being copied over in the final step of the VB script.


                              To answer your question, I have not tried to incorporated this in the setup.



                              But the script certainly does work well!


                              I have slowly been trying to add pass/fail response codes so I can tell if something went horribly wrong in the execution.

                              But I have too much on my plate right now =o(


                              Thanks again Silvercoupe  =o)

                              • 12. Re: When/How is the unattend.xml processed in Provisioning?  LDMS 9.2

                                Silvercoupe .. i looked at the cmdlines.txt option but after reading Jan's document on HII, i decided against it. You second that, and based on your experience and what Jan suggests, i'd rather have the setup based drivers run post mini-setup.


                                Yes, i did notice the "1,True" that you added to the Run command and it works out really nice!




                                Doc .. here is what i have so far in my prov. template:


                                Post OS install: Inject sysprep, Copy the vbs script to c:, CTOS


                                System configuration: Wait 10 mins, Install LD agent, Join Domain, Delete vbs script, Reboot


                                Mini-setup runs, machine reboots, vbs script kicks in (since its in GuiRunOnce in sysprep.inf), prov agent kicks in with the 10 min. wait, vbs script does its copy/installs, LD agent install starts ...

                                • 13. Re: Dealing with setup based drivers in HII
                                  EMiranda Expert

                                  Hey guys, i know you all discuss VB in this thread, but I had written this article a while ago and may help out for anyone that may still be having issues.



                                  • 14. Re: Dealing with setup based drivers in HII

                                    is anyone using either method outlined here with Windows 7 whereby the script is being kicked off in the Unattend.xml file?


                                    I'm usint EMiranda's version which is not VBS-based, rather batch-file and exe-file based utilizing a tool called autoIT.  In any case the choice doesn't really matter to me, what does is the HOW part for windows 7.


                                    I'm trying to start my script towards the end of my Unattend.XML file.  I tested it outside of minisetup using the LDMS provisioning system and I had it running in the SYSTEM CONFIGURATION phase.  While this worked I felt like I needed to push it back into Minisetup because immediately after running this I want to be able to run WINSAT.EXE to set the performance benchmark for the machine.  As I have been unsuccessful in getting winSat.exe to run with provisioning, I am able to get it running within minisetup.  hence the reason to push my driver installs back there.


                                    So fart I have tested this and verified that my sysprep logs show the calling of the script, but then immediately afterward WinSat.exe gets called.  I need several minutes between the two scripts so that the first will complete.  How can I code the execution of my script within UNATTEND.XML to wait for the script to complete before proceeding with the winsat.exe?


                                    -any thoughts?

                                    1 2 3 Previous Next