according to my online help file with the console, the stored database values should be referenced as follows:
under the heading of ACTION VARIABLE:
Enter a database ID string, such as Computer.Network."NIC address"
In my case I want to use my "computer description" so I am referencing my database value as: Computer."Description".
I have confirmed that the file I want is listed in the root of a computer's inventory when I look at a the results of an inventory scan. I have also manually entered all of the steps in my provisioning template within a command line window and verified everything works.
So at this point I think I resolved my problem with DATABASE NAME SYNTAX, however now my provisioning template won't complete successfully.
My provisioning template looks like this:
Step1, a .ini file is copied to the local disk which contains a general term, %ComputerDescription%
step2, then the text ComputerDescription is replaced with a variable by the same name %ComputerDescription%; this step contains an ACTION VARIABLE which calls for the replacement of that variable with Computer."Description"
Step3, some kind of environment variable is prepared with SET /p DESCRIPTION=<C:\Administration\test.ini
Step4, next the registry is finally updated with the previous computer description according to REG add "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" /v srvcomment /t REG_SZ /d "%DESCRIPTION%" /f
-where the environment variable from Step3 appears at the end of the options
Again, if I manually key all of this into my client from a command line, it works fine. When I use this with PROVISIONING I get an error on Step4:
"FAILED, the specified user variable does not exist."
With your action using a variable do you have it in the template as %%ComputerDescription%%. I remember getting that error using a variable yesterday and found out I had to double up on the % so provisioning reconizes it as a vairable.
I have attached my template here; it is setup to be an INCLUDE that will be used with a more full-featured image deployment template.
I finally sorted it out; I had one problem that was related to my database values and variable references then a second problem that had to do with file copy actions failing.
Per the original document I cited, I was trying to copy a DESCRIPTION.INI file to the target computer ahead of doing the rename. For some reason I can't copy some files to my target computers using the FILE COPY action; it fails. To work around this I added the INI file as a SCRIPT and I am now injecting that script via the provisioning template. This solved the latter problem.
The former problem was resolved by figuring out how to format DATABASE VALUE field names; in this case the correct reference for the computer description is <Computer."Description"> without the brackets. This pulls the correct value from the database.
In terms of putting all together I ran into a few problems where I got USER VARIABLE DOES NOT EXIST when I attempted to inject the scripts. This was solved by ensuring that the template had a template variable name which matched the one called out in the INI file, AND, to the point you were getting at in your reply, I needed to denote an environment variable with double %%s.
Provisioning variables use single %s and environment variables on the target PC are denoted with double %%s. You might double check your own work because the statement in your reply is not correct.
Again, the template I created is attached here; it makes use of two injected scripts which are also attached. The variable used here is %ComputerDescription% and it gets set to whatever is in the database for a given target computer.
-anyway, this one is SOLVED.
Ah ok so thats how that works! Cool thanks, yea the variable I was using was an environment one.
Nice work man! Thanks for viewing and referencing my document on the Description injection
Here's a challenge for ya: Make this same thing happen in the Post-OS section while still in WinPE, without the use of any INI or BAT files!
Hint: It involves putting the data straight into the registry of the newly deployed C: drive
Hey AspenSkier - check out my updated document
Provisioning Include template that handles Description injection without any batch files, INI files, image modifications, etc...