I'm using 2 user exit scripts as well as another custom property to set computername. In the end it looks like this
OSDComputerName=%Site%-%SysModel%-%SysSerial%
After much testing (via cscript //nologo \\server\deploymentshare$\scripts\ztigather.wsf /debug:true /inifile:\\server\deploymentshare$\control\customsettings.ini) , I can confirm the OSDComputerName variable I'm setting in my CustomSettings.ini
(CS.ini hereinafter) is getting set properly.
I successfully deployed a test image to sample machine & I found myself looking at the Computer Name setup screen that was pre-filled with just 'PC'. I clicked next & let the rest of the task sequences complete. At the end I looked at
the BDD.LOG in C:\Windows\Temp\DeploymentLogs where I could see the variable was set, but not used.
Property OSDCOMPUTERNAME is now = WA-X20-1234567
Using from [DEFAULT]:" OSDCOMPUTERNAME = WA-X20-1234567
...further down...
No value found for ComputerName
...further down...
//settings[@pass="specialize"]/component[@name="Microsoft-Windows-Shell-Setup"]/ComputerName not found in C:\MININT\Unattend.xml, unable to update.
...further down...
No value found for ComputerName
...further down...
//settings[@pass="specialize"]/component[@name="Microsoft-Windows-Shell-Setup"]/ComputerName not found in C:\MININT\Unattend.xml, unable to update.
I checked the Unattend.xml for the Task Sequence in question and the ComputerName property (Under 4 specialize -> x86_Microsoft-Windows-Shell-Setup_neutral) is blank, and the 'Write Empty String' isnot checked.
What have I done wrong?
Should the 'Write Empty String' be checked?
Is it expecting '%ComputerName%' or '%OSDComputerName%' in the 'ComputerName' property of the Unattend.xml?
Do I have to create a new VBScript to set the environment variable? (essentially negating what I've already done in the CS.ini)
Many thanks!