3 Replies Latest reply on Apr 18, 2011 2:54 PM by Mach6

    Probleme with a template's variable

    Apprentice

      I need to create a template's variable for the Windows CD Key. I have a script VBS wich backup the CD key from Windows, into a system variable, VE_XP_CDKEY. As this variable is read by the inventory scan, I want to use it in a provisionning template.
      So, I create in Public variable windows, the following variable : LDXPCDKEY; Database Value; "Computer"."Environment"."Variable"."VE_XP_CDKEY".
      I hoped that this variable will have worked the same way that the %ldHostname%. But it still not work, and I dont understand why.

       

      In my template, I copy a sysprep.inf and then, I change the default computer name by the old one's using "%ldHostname%" . I would like to do the same thing, and change the default cd key by the old one's using "%LDXPCDKEY%.

       

      I posted the capture of an inventory window with the environment variable. Note that I remove the real CD key.

       

      Please, someone have an idee?

        • 1. Re: Probleme with a template's variable
          Specialist

          If you XP cd key is static, why don't you create it as a string public variable instead of database value.

           

          Search value          Replace value                                             Type

          LDXPCDKEY          12345-12345-12345-12345-12345                 String

          • 2. Re: Probleme with a template's variable
            Apprentice

            That is the problem. We have some OEM Windows XP licenses, so the cd key is never the same. I need to backup it before remastering a computer.

             

            But actually I am testing a solution. I forget a sub-value in my template variable.
            Actually I use  "Computer"."Environment"."Variable"."VE_XP_CDKEY"."Value"
            It seems to modify successfully my "sysprep.inf" file.

            • 3. Re: Probleme with a template's variable
              Employee

              If these are OEM Windows XP Professional licenses you should be able to follow the instructions here:

              http://technet.microsoft.com/en-us/library/bb457078.aspx

               

              There is a key you can use that will activate on OEM boxes.  If your scenario is a bit different, in that some are volume license and others are OEM then it becomes a bit more difficult.

               

              The variable name you mentioned actually should work.  You could try and test the variable by using it elsewhere in a provisioning script, such as making a temporary registry value.  That way you can see what it's actually pulling out and see if there's a problem with it.

              1 of 1 people found this helpful