2 Replies Latest reply on Aug 12, 2010 9:34 AM by AspenSkier

    what is the correct method for using variables in UNATTEND.XML?

    Specialist

      I am trying to use LDMS 9.0 Provisioning to perform an image deployment process in conjunction with UNATTEND.XML for the mini-setup part of Win7.

       

      I've been using a very simple unattend file with success to this point; I'm now trying to put variables into the unattend file and have both PUBLIC and TEMPLATE variables come into play during provisioning to change that unattend file.

       

      an example.

       

      I want a variable for the local admin password on the machine.

       

      My unattend.xml file contains referencest to this and I insert %localadminpass% into those parts of my unattend file.

      In my provisioning template I inject that unattend.xml file then perform REPLACE TEXT steps to exchange the text in the file with my variables.

       

      I just ran a provisioning task against a machine where the references in the unattend file exactly matched the variable names within PUBLIC variables.  None of the variables I was attempting to use got passed.  In the case of the local admin password, it became exactly "%localadminpass%".

       

      Do I need my variables names to be different from the text I am replacing?

       

      For example, should my unattend file include "localadminpass" and my REPLACE TEXT action say: replace "localadminpass" with %localadminpass%

       

      -thoughts or advice?

        • 1. Re: what is the correct method for using variables in UNATTEND.XML?
          Apprentice

          I think where you're going wrong may be in WAIK.  If you look at the section of your unattend file where you're setting the local admin password (Windows Shell Setup I think), you'll notice that when you click on the attribute for administrator password, on the upper right pane there's a setting called 'plain text' which is set to 'false' by default.  The function of this setting is to take whatever value you enter into the password attribute and scramble it.

           

          The effect of this on your %localadminpass% variable is that it gets turned into something like this 'kugaadsffiysaffklgsdd8oy634'!  Therefore, when the Provisioning agent injects your unattend file it doesn't see the value as a variable and just leaves it as it is.  Then, during mini setup, the password is de-scrambled back to %localadminpass% and that literally becomes your password.

           

          The plain text setting cannot be changed by clicking on it - its a global setting in WAIK.  To turn it off you have to click on 'Tools' in the top menu and then de-select 'Hide Sensitive Data'.  You may then have to retype your variable in the admin password field and save.  Once done you should see that 'plain text' has changed to 'true'.  Save your xml file and re-inject into provisioning.  Hopefully that'll get things moving!

           

          Hope this helps.

           

          Steve

          • 2. Re: what is the correct method for using variables in UNATTEND.XML?
            Specialist

            Thanks, that was the problem.

             

            Originally my .XML file was fine, but I brought it into the SIM part of WAIK and it decided it would be a good idea to change things to hide that sensitive data.

             

            -I fixed it per your instructions, re-ran it with no problem.

             

            -cheers!