Computer description in the MDT 2012 Wizard?
-
Wednesday, April 18, 2012 7:37 PM
With MDT 2010, I could add the computer description in the Wizard. But since I installed MDT 2012, the field vanished...
In MDT 2010, I only had to modify DeployWiz_Definition_ENU.xml.... In 2012, looks like the file is not the same...
I'm not using SCCM!
All Replies
-
Wednesday, April 18, 2012 11:01 PM
Hi. Here is an explaination from Niehaus: http://blogs.technet.com/b/mniehaus/archive/2012/01/07/customizing-wizards-with-mdt-2012.aspx
The file you need to edit is DeployWiz_ComputerName.xml
Oddvar Håland Moe | My blogs: MSitPros.com and Moe.am | Twitter: @Oddvarmoe | Linkedin: Oddvar Håland Moe
- Marked As Answer by BiduleX Thursday, April 19, 2012 2:59 PM
-
Thursday, April 19, 2012 3:06 PM
Thanks!
The link you gave me does not explain how to add the description but explain how the new xml and vbs files works.
I made some modifications to DeployWiz_ComputerName.xml and DeployWiz_ComputerName.vbs to had a Description field and validation. It's working perfectly!
Modifications I made : Copy the ComputerName section and Past as ComputerDescription... And modify the .vbs to have some sort of validation.
-
Thursday, April 19, 2012 3:25 PM
Is there anyway you could expand on this BiduleX? I am wanting to achieve the same thing. I had this working in 2010. I am very subpar on my scripting. Is there anyway you could copy the code from both your DeployWiz.xml and the vbs? Any help would be appreciated.
Thanks!
Joe
-
Sunday, April 22, 2012 4:24 AM
Is there anyway you could expand on this BiduleX? I am wanting to achieve the same thing. I had this working in 2010. I am very subpar on my scripting. Is there anyway you could copy the code from both your DeployWiz.xml and the vbs? Any help would be appreciated.
Thanks!
Joe
Yes, please...BiduleX. I would really appreciate more details on how you solved the problem.
Thank you
-
Monday, April 23, 2012 12:53 PM
Sorry for the "bad" english...
I fact, I just copy and past it under the computer section... and made some changes. Next, you have to make some sort of validation in the .vbs. My vbs in not ready yet since the description will be the decorticated to automatically create and join the right organisation unit later on. But for your needs, you could check the way it's made for the computer name validation and adapt it for the description...
DeployWiz_ComputerName.xml
<table style="width: 100%;"> <tr> <td style="width:1px;"> <img src="DeployWiz_Computer.png"> </td> <td style="width: 160px;"><span class=Larger>Compu<u class=Larger>t</u>er name:</span></td> <td align="left"> <input type=text id="OSDComputerName" name=OSDComputerName size=15 language=vbscript onpropertychange=ValidateComputerName AccessKey=t /> <label class=ErrMsg for=OSDComputerName>* Required</label> <label class=ErrMsg id=InvalidChar>Invalid characters!</label> <label class=ErrMsg id=TooLong>Maximum of 15 characters!</label> </td> </tr> </table> <table style="width: 100%;"> <tr> <td style="width:1px;"> <img src="DeployWiz_Computer.png"> </td> <td style="width: 160px;"><span class=Larger>Description:</span></td> <td align="left"> <input type=text id="OSDComputerDescription" name=OSDComputerDescription size=30 language=vbscript onpropertychange=ValidateComputerDescription /><BR> <label class=ErrMsg id=DescTooLong>Maximum of 50 characters!</label> </td> </table>
DeployWiz_ComputerName.vbs
Function InitializeComputerDescription If oProperties("OSDComputerDescription") = "" then OSDComputerDescription.Value = oUtility.ComputerDescription End if If UCase(oEnvironment.Item("SkipComputerDescription")) = "YES" then OSDComputerName.disabled = true End if End Function Function ValidateComputerDescription 'Check Warnings ParseAllWarningLabels If Len(OSDComputerDescription.value) > 50 then 'InvalidChar.style.display = "none" DescTooLong.style.display = "inline" ValidateComputerDescription = false ButtonNext.disabled = true 'Elseif IsValidComputerDescription ( OSDComputerDescription.Value ) then Else ValidateComputerDescription = TRUE DescTooLong.style.display = "none" End if End function
- Edited by BiduleX Monday, April 23, 2012 1:03 PM
-
Monday, April 23, 2012 4:19 PM
That part works great! What did you use to actually set the description though? Before we had to use the ZTISetComputerDescriptionLocall.wsf file somewhere in the task sequence. Awesome work! Thanks again BiduleX!
-
Monday, April 23, 2012 5:22 PM
To set the description in the MDT Database?
Create a insertDB.ini file in the DeploymentShare\control forder.
[Settings] Priority=InsertComputerName [InsertComputerName] SQLServer=YourServer Instance=SQLEXPRESS Database=MDT Netlib=DBNMPNTW SQLShare=Logs$ StoredProcedure=InsertComputerName Parameters=MacAddress, OSDComputername, SerialNumber, OSDComputerDescription
Next, in your task sequence, Add a new Gather under the initialization. Give it a name "Add to MDT Database" and a description. Select "Gather local data and process rules" and in "Rules file:" type insertDB.ini
You should now see a description field under the computer name in the Wizard. Once the deployment starts, if you go see the computer on your MDT database, you should see your computer's name, description, Mac Adress and Serial number. Refresh does not work in the database. You should restart MDT to see the new computer in your database.
-
Monday, April 23, 2012 5:47 PM
You can see how it's done with MDT 2010.
http://www.deployvista.com/Home/tabid/36/EntryID/154/language/en-US/Default.aspx
For MDT 2012, do as I did in my previous post.
-
Monday, April 23, 2012 7:45 PM
Haha sorry I guess I should have been more clear on what I meant. We dont use the Database here.
I modified both the ComputerName files as you said above. In my UI when I'm going through MDT, it does show the new description field when building a PC. However it doesnt actually set the description with what I put in the fields. In Johan's past how-to he has a "ZTISetComputerDescriptionLocall.wsf" file you have to run in your task sequence for it to actually set the description in the OS. This is what I'm missing.
Thanks again!
-
Tuesday, May 01, 2012 7:11 PM
Haha sorry I guess I should have been more clear on what I meant. We dont use the Database here.
I modified both the ComputerName files as you said above. In my UI when I'm going through MDT, it does show the new description field when building a PC. However it doesnt actually set the description with what I put in the fields. In Johan's past how-to he has a "ZTISetComputerDescriptionLocall.wsf" file you have to run in your task sequence for it to actually set the description in the OS. This is what I'm missing.
Thanks again!
I was doing the same thing in MDT 2010 and upgraded to MDT 2012. After reading thru this post, googling the issue, reading thru the wizard editor documentation, and reading thru Johan's blog again, I combined the code in the wizard and I got the description to work in MDT 2012 similar to MDT 2010.
The highlighted code below is the only thing I added to my DeployWiz_ComputerName.xml (pasted the whole DeployWiz_ComputerName.xml below if you want it). I don't know if by combining the code from MDT 2010 and MDT 2012 is why this is working for me (same variables and all that jazz...) or not.
Added code:
<table style="width: 100%;"> <tr> <td style="width:1px;"> <img src="DeployWiz_Computer.png"> </td> <td style="width: 160px;"><span class=Larger>Computer <u class=larger>d</u>escription:</span></td> <td align="left"> <input type=text id="Description" name=ComputerDescription size=40 language=vbscript onpropertychange=ValidateComputerName AccessKey=d /> </td> </tr> </table>
Full code: (DeployWiz_ComputerName.xml)
<?xml version="1.0" encoding="utf-8"?> <!-- ' // *************************************************************************** ' // ' // Copyright (c) Microsoft Corporation. All rights reserved. ' // ' // Microsoft Deployment Toolkit Solution Accelerator ' // ' // File: DeployWiz_Definition_ENU.wsf ' // ' // Version: 6.0.2223.0 ' // ' // Purpose: Main Client Deployment Wizard Defintion File ' // ' // *************************************************************************** --> <Wizard> <Global> <CustomScript>DeployWiz_ComputerName.vbs</CustomScript> </Global> <Pane id="ComputerName" title="Computer Details"> <Body><![CDATA[ <table style="width: 100%;"> <tr> <td style="width:1px;"> <img src="DeployWiz_Computer.png"> </td> <td style="width: 160px;"><span class=Larger>Compu<u class=Larger>t</u>er name:</span></td> <td align="left"> <input type=text id="OSDComputerName" name=OSDComputerName size=15 language=vbscript onpropertychange=ValidateComputerName AccessKey=t /> <label class=ErrMsg for=OSDComputerName>* Required</label> <label class=ErrMsg id=InvalidChar>Invalid characters!</label> <label class=ErrMsg id=TooLong>Maximum of 15 characters!</label> </td> </tr> </table> <table style="width: 100%;"> <tr> <td style="width:1px;"> <img src="DeployWiz_Computer.png"> </td> <td style="width: 160px;"><span class=Larger>Computer <u class=larger>d</u>escription:</span></td> <td align="left"> <input type=text id="Description" name=ComputerDescription size=40 language=vbscript onpropertychange=ValidateComputerName AccessKey=d /> </td> </tr> </table> <div id="DomainSection"> ***Rest of code from DeployWiz_ComputerName.xml*** </Wizard>
So far this is working for me to deploy XP and Windows 7, write the description to AD and locally.
Try it and let me know if it works for you Joe.
Thanks
- Edited by SJ3ff Tuesday, May 01, 2012 7:12 PM
- Edited by SJ3ff Tuesday, May 01, 2012 7:17 PM
- Edited by SJ3ff Tuesday, May 01, 2012 7:53 PM
- Proposed As Answer by Joe Cutter Thursday, May 03, 2012 7:41 PM
- Edited by SJ3ff Wednesday, November 28, 2012 7:01 PM Edited to make it easier to read the thread.
-
Thursday, May 03, 2012 7:41 PM
Yep that worked perfect SJ3FF. I tried adding all that other stuff Bidule suggested with no luck. Anyone who else that may come across all you need to do is the following to sum up what everyone is talking about:
This is for MDT 2012. For MDT 2010 just follow the link below and follow the instructions.
1) Do exactly as SJ3FF says above and edit the DeployWiz_ComputerName.xml as per his instructions above.
2) Visit this link which is a walkthrough by Johan Arwidmark for MDT 2010.
3) Download the sample scripts and go to the very bottom of his article and do the step about creating a new step in the State Restore phase which executes the ZTISetComputerDescriptionInAD.wsf file.
Works like a charm! Thanks everyone :)
-
Friday, May 04, 2012 1:03 PM
I'm glad it worked out for you Joe and nice breakdown of the steps. Now remember, this is for an updated MDT 2012 deployment share from MDT 2010. I have not tested this on a clean install of MDT 2012.
Shawn
- Edited by SJ3ff Friday, May 04, 2012 1:09 PM
-
Friday, May 04, 2012 2:03 PM
I tried this on both a fresh 2012 install and an updated from 2010 share. Both worked flawlessly.
-
Wednesday, July 11, 2012 10:33 PMIt showed up on the MDT info page and I was able to put the info in but when I checked on the computer properties it was blank. Any suggestions?
-
Friday, August 24, 2012 6:29 AM
Does anyone know why Microsoft would have removed this 2010 computer description feature in 2012?
I wonder if they will add it back in a future MDT 2012 update that would end up breaking this home made workaround later.
Was it added to MDT 2012 Update 1?
-
Friday, August 24, 2012 7:22 AM
MDT has never had a computer description feature. So it was never removed, and no, nothing has been added like this in MDT 2012 Update 1.
Thanks,
-Michael Niehaus
Senior Product Marketing Manager, Windows Deployment
http://blogs.technet.com/mniehaus
mniehaus@microsoft.com -
Monday, August 27, 2012 9:09 AMMichael,
No such feature in MDT 2010 but a hidden field in the computer name wizard page.
Thanks to Johan Arwidmark this field allowed us to add the computer description during deployment.
Anyway it's not that hard to recreate a wizard page to make this work.My Blog: DeployXP [Under Construction]| Viadeo: Mathieu Ait Azzouzene | Linkedin: Mathieu Ait Azzouzene
-
Tuesday, November 20, 2012 4:37 AM
Can you please show me how to do a computer description for the MDT 2012 Udi custom page design? I have intergrated MDT 2012 with SCCM 2012.
Thanks.
-
Tuesday, November 27, 2012 10:30 PM
I have both an XP and a Windows 7 deployment share that I have upgraded to MDT 2012 on our test server. I made the changes listed above to get the description box back in the MDT wizard and all is well.
My XP share images and adds the description to AD as intended, however when I run my Windows 7 image I get a "The system cannot find the file specified" error.
This worked just fine on both shares before I made the upgrade. I have even tried copying the whole scripts folder from the XP share to the 7 share with no change.
Any help would be appreciated!
-
Friday, December 14, 2012 1:25 AMTried this code. The XML part seems good but the VB part seems to be lacking something. Any assitance would be greatly appreciated.
-
Wednesday, December 19, 2012 2:12 AM
Hi Joe,
I applied the steps as indicated above to no avail. I do have MDT 2012 Update 1 - if that makes a difference. Any assitance would be great.
-
Tuesday, December 25, 2012 8:13 AM
Thanks for this scripts, It showed up on the MDT info page and I was able to put the info in but when I checked on the computer properties it was blank. is there any modification should I do?
-
Tuesday, December 25, 2012 8:15 AM
It showed up on the MDT info page and I was able to put the info in but when I checked on the computer properties it was blank. Any suggestions?
I have the same problem -
Tuesday, May 07, 2013 5:40 AM
i am having a problem with the account for the below step
we dont have a generic account to join the domain, all the tech use their own account to join thedomain,
cant i make it take the credential , the one i supply at the begenning
Step 2 - Store the Description value on the computer object in Active Directory
- Download the sample scripts.
- Copy ZTISetComputerDescriptionInAD.wsf to the scripts folder in your deployment share.
- Create a custom action in the State Restore phase, any place will do, I added the action to the Custom Tasks group. Use the following settings
Type: Run Command Line
Name: Set Computer Description in Active Directory
Command: cscript.exe "%SCRIPTROOT%\ZTISetComputerDescriptionInAD.wsf"
Runas:
Load the user's profile: Selected
Note: The account that you use must have permissions in Active Directory to modify computer object attributes.
To be successful in life, you need to work smarter and not harder, and dont forget to drink your milk and say your prayers

