5 Replies Latest reply on Nov 11, 2012 6:34 PM by JDarrah

    Variables within a template aren't recognized

    Rookie

      Hi all,

       

      In our company we use LANDesk provisioning to install devices.

      We've got a template which uses several variables, for f.i. username / password, shares, etc

      In our environment we have multiple PXE reps.

      The case is that sometimes the variables aren't recognized, example is when we want to Map a drive, the action fails.

       

      Any idea's what we can do to troubleshoot this?

        • 1. Re: Variables within a template aren't recognized
          Specialist

          Have you tried using Public Variables for mapping drives. To me it seems that the Template Variables are more a find and replace. For example you would have a public variable for \\SERVERXYZ\\SOFTWARE = SERVERSHARE so in your map drive action you would have %SERVERSHARE%.

           

          If you were to clone that template and setup a Template Variable for another site you could say search value SERVERSHARE is replaced with \\DIFFERENTSERVER\SOFTWARE

           

          That is how we use them. Public Variable for mapped drives to be used in various templates, then use Template Variable to replace the value if needs to be directed to an off-site server and so on. Hope this makes sense.

          1 of 1 people found this helpful
          • 2. Re: Variables within a template aren't recognized
            Rookie

            Thanks for the reply Ascott860.  Kevlar and I are working on this issue together.  I believe we are already doing what you suggested.  Here is the ouput during the provisioning process and below that is the xml of the script for the section that it is failing.  Keep in mind, this same template works fine on all of our provisioning server except for 2.

             

            Connect to core:  10.31.0.91

            Loading Template...

            action index=170447 type=Map_drive

            FAILED

            error:[80001803H]The action failed.

            Execute result:

            return:2250

            output:

             

            action index=170448 type=Map_drive

            FAILED

            error:[80001803H]The action failed.

            Execute result:

            return:55

            output:

             

            action index=170449 type=Execute_file

            SUCCESS

            Execute result:

            return:3

            output:

             

            <template id="9b420c76-e313-43e4-aa33-9ebce9e45b6a" name="Global Windows 7SP1 [v48a] [Without Entpoint Encryption]" version="4">
                <description />
                <preboot-os>WindowsPE</preboot-os>
                <final-os>
                    <name>Windows 7</name>
                    <type-id>Standard</type-id>
                    <family-id>Windows</family-id>
                    <vendor-id>Microsoft</vendor-id>
                    <major-ver>6</major-ver>
                    <minor-ver>1</minor-ver>
                    <architecture>i386</architecture>
                </final-os>
                <variables>
                    <variable name="share" transform="none">\\%pxeproxy%\provisioning$</variable>
                    <variable name="autologon" transform="none">true</variable>
                    <variable name="copydrivers" transform="none">\\\\%pxeproxy%\\provisioning$\\global\\drivers</variable>
                    <variable name="Win7ProdKey" transform="none">xxxxx-xxxxx-xxxxx-xxxxx-xxxxx</variable>
                    <variable name="guardpassword" transform="sensitive">xxxxxxxxxxxxxxxxxxxxxx</variable>
                    <variable name="globalshare" transform="none">\\%pxeproxy%\provisioning$\global</variable>
                    <variable name="Allmodels" transform="none">\\%pxeproxy%\provisioning$\global\drivers\allmodels</variable>
                    <variable name="drivers" transform="none">c:\windows\LDDriverStore</variable>
                    <variable name="autologoncount" transform="none">5</variable>
                    <variable name="globalPackageShare" transform="none">\\%pxeproxy%\ldpackages\</variable>
                    <variable name="AdminPass" transform="none">xxx</variable>
                    <variable name="FPPS" transform="none">%pxeproxy%</variable>
                </variables>
                <section id="SystemMigration" name="System migration">
                    <description>Back up personal or custom files before the system is modified.</description>
                </section>
                <section id="PreOsInstall" name="Pre-OS installation">
                    <description>Configure the hardware and get the system ready for installing the target OS.</description>
                    <action name="Unmap all drives" version="4">
                        <description>Unmap all drives</description>
                        <action-type>Map_drive</action-type>
                        <variables />
                        <options>
                            <option name="StopProcessingTemplateIfActionFails">false</option>
                        </options>
                        <parameters>
                            <localpath>i:</localpath>
                            <action>disconnect</action>
                        </parameters>
                    </action>
                    <action name="Map Global" version="4">
                        <description>Map Global</description>
                        <action-type>Map_drive</action-type>
                        <variables />
                        <options>
                            <option name="StopProcessingTemplateIfActionFails">false</option>
                        </options>
                        <parameters>
                            <username>%pruser%</username>
                            <password>%prpassword%</password>
                            <uncpath>%globalshare%</uncpath>
                            <localpath>i:</localpath>
                            <action>connect</action>
                            <PasswordIsVariable>True</PasswordIsVariable>
                            <PasswordIsEncrypted>False</PasswordIsEncrypted>
                        </parameters>
                    </action>
                    <action name="Diskpart" version="4">
                        <description>Diskpart</description>
                        <action-type>Execute_file</action-type>
                        <variables />
                        <options>
                            <option name="StopProcessingTemplateIfActionFails">true</option>
                        </options>
                        <parameters>
                            <application>diskpart</application>
                            <arguments>/s i:\tools\skript.txt</arguments>
                            <workingdirectory />
                            <retvalop>DontCare</retvalop>
                            <environmentvariables />
                            <capture_output>True</capture_output>
                        </parameters>
                    </action>
                    <action name="Remove Partitions" version="4">
                        <description />
                        <action-type>Partition</action-type>
                        <variables />
                        <options>
                            <option name="StopProcessingTemplateIfActionFails">true</option>
                        </options>
                        <parameters>
                            <action>removeall</action>
                            <diskID>0</diskID>
                            <partitionID>1</partitionID>
                        </parameters>
                    </action>
                </section.

            • 3. Re: Variables within a template aren't recognized
              Tom Farrugia SupportEmployee

              One thing to remember is that variables are case sensitive.  Could that be the issue?

              • 4. Re: Variables within a template aren't recognized
                Rookie

                The 'funny' thing is, that it is only sometimes that it doesn't work, and on some sites it never works. Even at the main site where it should always work, it gives problems every now and again.

                We don't change the variables, so they should be good basically. However I think that somehow they cannot be read or something

                • 5. Re: Variables within a template aren't recognized
                  Apprentice

                  Since it's failing when trying to map the drive, here is what we ran into...

                   

                  If the date/time are not correct in the BIOS of the machine being reimaged, then LANDesk's command that they use to map drives (Drvmap.exe) will fail.  In my experience, it will try multiple times and eventually lock out the account being used to map the drives (which makes it fail at all sites until the account unlocks again).  Of course, that depends on the settings you have for AD accounts (lock machine after x failed attempts)