4 Replies Latest reply on May 12, 2009 11:52 AM by ahe

    Software installs in OSD

    Apprentice

      Is there a way to add a software package install to a OSD template to be conditional?  IE: Have the template look for a laptop.txt file that was placed by the copydrivers.exe.  If it exists, it could install a package, or else skip install.  Or is this something process manager would be able to do?

        • 1. Re: Software installs in OSD
          Apprentice

          You can achieve this by scripting either batch or vbscript files, though not necessarily the most ideal way in my opinion (although this is the way I do it myself at the moment -- I'm looking at other ways).

           

          Consider this:

           

          a vbscript that checks for the laptop.txt file.  If it exists, it copies down a 'laptop.bat', except it copies it down as postinstall.bat.  If there is no laptop.txt file, it copies down a desktop.bat as postinall.bat.  Since either file copied down is renamed to postinstall.bat, your next line in the OSD script can call that batch file to run your post commands. The downside is that you lose the 'LANDesk oversight' of the process.

           

          Here's what I'm thinking would be a better:

           

          If you use provisioning, you may be able to use a more clever way -- again, I've been meaning to have a closer look at this but haven't as of yet:

           

          Create provisioning templates to install your applications post image deployment -- one for your laptops and one for your desktops.

          I generally use a flag on my images in the registry to note that a system has been freshly imaged.  This way you can run a LANDesk query against the key and find these machines.

          Create a query against the database for systems that are freshly imaged (using your defined flag) and are laptops (chassis type is notebook or portable is one way to identify them -- there are others)

          Create a provisioning task to execute the software distribution template against the machines that fulfill the query.

          At the end of your OSD job or image provisioning job, run policysync, which should in theory kick off the other template.

          The last task in your software provisioning template should set the flag to 0 so it doesn't attract any other policies for newly imaged machines.

           

          If this works for you, let me know!

          • 2. Re: Software installs in OSD
            zman Master

            In addition to what Dave said, I would use provisioning, with existing software distribution packages. I would create a prerequisite package that checks for the existence of a battery (WMI/VB script, Autoit - I have this code if you want, etc...)  You could also check for the existence of this file, but I find checking for a battery is much more accurate.  If the prereq fails it will not run the main package.  SP3 has better sequencing of package order so you could do more with SP3.

             

            Also, it appears that more and more users are requesting better detection of laptops/mobile devices in all aspects of the product (patch, provisioning, etc..) It would be nice if LANDesk ramps up laptop detection, battery detection, etc....

            • 3. Re: Software installs in OSD
              Apprentice

              I had tried adjusting the Distribution package to include a prerequisite query which seems to work for just a normal software distribution.  But in a provisioning task, it does not seem to check prerequisites and just installs the software.  Where would your script be running?

              • 4. Re: Software installs in OSD
                ahe Expert

                I'm not sure which LD version you have, in 8.7 SP6:

                 

                You can use "Execute file" in "Action list" - "System configuration" - "Add..." - "Type" to start a batch/AutoIT/VB Script as first step in your "System configuration".

                 

                If the script fails (mark the Option: "Stop processing the template if this action fails") the whole template will fail.

                 

                Regards

                Axel