5 Replies Latest reply on Jul 22, 2016 4:07 AM by phoffmann

    Create Task using SDK with precache option

    Chr1st0phe Rookie

      hello to everyone !

       

      I create tasks with the SDK (with powershell or VB.NET) and in some cases I do not want automatically execute the package .

      I wish caching only. How to set a task with the SDK to achieve this? I will wish not modify directly in the database to set the task.... It would be too easy

       

      An idea?

       

      Chr1st0phe

        • 1. Re: Create Task using SDK with precache option
          phoffmann SupportEmployee

          Couple of things that may be of general help to you (since you seem to be quite script happy - hope it'll be useful reading) :

          - How to use PEDownloader.exe to Duplicate / Troubleshoot Software Distribution

          - Getting Started with the MBSDK (Example Scripts Included)

           

          ... as for your specific need...

           

          ... you would want/need to create an agent setting ("delivery method" if you're been around pre 9.6) that is a "pre-cache only" agent setting.

           

          You then use THAT agent setting as part of your task configuration - and voila - problem solved.

           

          Here - this screenshot should help highlight the relevant parameter in the "CreateNewTask" Method .

          MBSDK_CreateNewTask.jpg

           

          Hope that helps ?

          1 of 1 people found this helpful
          • 2. Re: Create Task using SDK with precache option
            Chr1st0phe Rookie

            Thank's a lot! That sound good

             

            Cool, PEDownloader is maybe a way out !

            The second link is already present in my first maid kit LANdesk

             

            I forgot to specify  , I'm in 9.6 SP1.

            In 9.6, agent settings or agent configuration doesn't have pre-cache parameters. This option apear in task options.

             

            I maybe not understand how to create a "Pre cache only" agent settings. May you give me more détail please ?

             

            So , i'm glad of your help

            Thank's

            • 3. Re: Create Task using SDK with precache option
              phoffmann SupportEmployee

              Hmm - you're correct. Drat!

               

              However, that's not a big deal to work around ... so - 2 things.

               

              1 - I'd suggest you log an enhancement request in the - Enhancement Requests  - portal, to have the option added to the MBSDK to set the download-behaviour for creating new tasks.

               

              2 - To work around your limitation/issue, you can just have the "main file" be something like a "echo hello" type BAT-file, and the actual package files be added as "Additional Files".

               

              That way, the additional files get downloaded, but not run. They still get stored / served for peer-download purposes, however. And the BAT-file doesn't actually do anything. You're (essentially) using a "do nothing" wrapper for this specific scenario.

               

              You'd end up having 2 package definitions for the same package in effect. One (for instance) "Office 365 Install" and one "Office 365 pre-load wrapper" (which has the batch-file that does nothing).

               

              ... when you schedule the "proper" install package out, clients will request the correct files / check their local cache & see that they have "the right file with the right hash value" and use those ... does that make sense?

              1 of 1 people found this helpful
              • 4. Re: Create Task using SDK with precache option
                Chr1st0phe Rookie

                Thank you

                 

                Enhancement Request il a good idea : Check!

                The work around proposed is a good idea too but the i have a lot of packages ... so a lot of modifications.

                 

                Thanks to you, i'm going on PEDownload road ! i will use ListDistributionPackages for found PackagePrimaryFile. It's a direct url string.

                 

                Thank you very much

                 

                Christophe

                • 5. Re: Create Task using SDK with precache option
                  phoffmann SupportEmployee

                  Happy to help. Have an awesome weekend!