When I had configured Provisioning in 8.8 I had used a sysprep file. The Inject Script action had me choose a script I had injected and a Target file name. Mine was C:\sysprep\syprep.inf. In the 9.0 Inject Script it's the same setup however now i'm using an .xml file. The target name on the default template is D:\unattend.xml. Since this location doesn't exist is this suppose to just point to the C:. Also, I'm curious about what is happening here. Is the injected script just getting sent to the location specified in the Target file name? Let me know what you guys think.
What OS are you provisioning? Also, did you get these templates from the Community? If so they are probably expecting that you are deploying a Windows 7 image with the 100 MB boot partition at the beginning. In that scenario it may be that the boot partition becomes C and the OS partition becomes D, meaning you would want to inject sysprep there.
Hope that clears things up a bit. If your partitions don't match what the template was expecting to see then yes, you will need to change it.
This makes sense. I'll let you know how I progress.
Okay, I am using the templates found on the community and it is just like you've stated:
Partition 1 is the boot partition and Partition 2 is the OS.
I have options checked for Bootable and Windows 7 with a seperate system partition.
The next task is the Inject Script. I have the Script I've selected choosen then the target file is D:\Win7Unattend.xml
I ran the Provisioning task and the Inject Script failed. Am I suppose to leave the .xml file named Unattend.xml?
Yes, unattend.xml. Why does it say it is failing? Are you missing a variable or something of that nature, can it not find the path to inject the script to? What's the reason it's giving for failing?
The error states: Specified User Variable Does Not Exist
Do you believe this is a variable in the script that is failing out?
Yes, I do. Open your script file (export it first if needed) and do a search for any % sign. Make sure everything with a % is a LANDesk Provisioning variable. If it's not a LANDesk variable (such as if it is a system variable) make sure that it is %% instead of %.
%windir% should become %%windir%%.
Also, if the LANDesk variable is a database variable (such as %ldHostname%) make sure that the database value exists for the device you're working with. For ldHostname in particular if you are using a bare metal machine you should change it from Device Name to Display Name in how the variable is defined, because Device Name only exists once an inventory scan is received, but Display Name always exists.
Hope that helps!
Yep, stupid variable error on my part.
So what if my script uses Percent symbols that are NOT anything to do with a variable? Any way around the "not exists" error? Example, I'm injecting an .HTA application, which has HTML in it of course. HTML has lots of percent symbols that are not variables!
Food for developers' thoughts...
Anything you want to be treated as just a single % sign while using inject script you just need to use a %%.