|
| Guests can view and read messages in the community forums, but you must register and log in to Deployment Forum before you can post messages. Click Register at the top of this page. Before posting messages, please read the forum guidelines at the bottom of this page. | |
| | Author | Messages | |
rob
Posts:11

 | | 06/17/2008 8:17 PM |
| hi. i have searched the forum but couldn't find anything similar. i want to know how i can re-use the values that were entered during the LTI wizard screens in a task sequence? i have a task sequence that creates a network adapter team, but the static ip is lost during the process. so what i want is to be able to use the information that was entered during the Static IP wizard screen at the start and apply that to my network team (i already have a script to apply the settings). is there a way i can store the values in variables (or in a file, or in the registry) so that i may use them later on? also, i want to add a "computer description" prompt on the same LTI wizard screen where the computer name is entered, and have it appear in the computer properties window. has anyone done this before? thanks! rob | | | |
| Konrad
Posts:67

 | | 06/17/2008 9:16 PM |
| From within a vbscript you can access any of the MDT task sequence variables by creating an object: Set oEnvironment = CreateObject("Microsoft.SMS.TSEnvironment") From here, you can get to variables you "know" by: sComputerName = oEnvironment.Item("ComputerName") If what you're after is a list, like Roles, or Applications are (defined in CS.ini as Application1, Application2, Role1, Role2, etc), you can use the following: Set dicRoles = oEnvironment.ListItem("Role") Which returns a dictionary object with the values in the "keys" of the dictionary.
Looking at NICSettings_Definition_ENU.xml, it looks like the variable you're after is named "OSDAdapter0IPAddressList" (as well as OSDAdapter0SubnetMask and others?), which is a comma deliminated list of IP addresses. Note that this "list" is different from the type used by Roles and Applications so don't use ListItem as shown above. If you look in ZTINicUtility.vbs it has some functions for dealing with some of the variables if you run into any trouble.
So to get the IP address list, you could try: sIPAddressList = oEnvironment.Item("OSDAdapter0IPAddressList") You can then run it through a vbscript "Split()" command to break it into an array from where you can extract your individual IP addresses.
As for adding a computer description option, I had a look in the file "DeployWiz_Definition_ENU.xml" (which defines all the panes of the deployment wizard), and line 310 appears to include this, but it's commented out... To "fix" this (if possible) would, I believe, involve editing this file to uncomment this section, updating ZTIConfigure.xml so that it knows of this option to go into your sysprep.inf file (if you're doing XP) or the Vista equivalent. But as it's commented out, I can only assume that for some reason there is a problem with this(?). | | | |
| rob
Posts:11

 | | 06/17/2008 9:28 PM |
| thanks for your reply Konrad, i will test this today and post my results.
regarding the computer description, i have already tried uncommenting that section from deploywiz_definition_enu.xml. this made the prompt appear on the wizard screen and it was possible for me to enter a description. however it didn't apply this description in the computer properties window. i am doing a lite touch install of Windows 2008 so i don't need the option to go into a sysprep.inf file. i just want the description to appear at the end of the install.
i guess this part was commented out by microsoft for a reason (a bug perhaps?).
| | | |
| rob
Posts:11

 | | 06/17/2008 11:52 PM |
| ok i tried it, and it worked after a little modification in the syntax.
for example, if i use the following code as it is, i get an error: sComputerName = oEnvironment.Item("ComputerName")
i changed it to: sComputerName = oEnvironment("ComputerName")
and it works.
i wrote a script to output all the available variables so i can see what can be used:
Set oEnvironment = CreateObject("Microsoft.SMS.TSEnvironment")
for each oVar in oEnvironment.GetVariables
wscript.echo oVar & " = " & oEnvironment(oVar)
next
well at least that's out of the way. i'm still working out how i can get the computer description code to work.
cheers,
rob
| | | |
| patrickm12981
Posts:44

 | | 06/18/2008 11:24 AM |
| | How/where did you run the script? From within PE? | | | |
| rob
Posts:11

 | | 06/18/2008 5:42 PM |
| i ran the script in a task sequence after it boots into Windows 2008 for the first time, and saved the output to a file. i guess i can also run the script from within PE but this method works the same. i just wanted to see all the variables that were available so that i can use them in my other scripts.
| | | |
|
| | You are not authorized to post a reply. |
|
| |
ActiveForums 3.7 | |
|  | These forums are a user-supported community for IT professionals to exchange deployment tips, solutions, and techniques. For the benefit of all Deployment Forum members, please observe the following guidelines when posting to these forums: - We reserve the right to remove any message. Our moderators will remove all messages that are not respectful or productive. Profanity, racism, prejudice, and flaming are not tolerated.
- Do not advertise products or services. Our moderators will remove all advertisements or service announcements. Product and service recommendations from active Deployment Forum members are encouraged, however.
- Make sure your question isn't already answered. Before posting questions, search the forums. After ensuring that your questions are unique, post them to the most appropriate forum. This will help reduce noise in the forums.
- Help make the most of each thread. Do not post unrelated messages to a thread. Also, if you've resolved a question outside of these forums, please share the solution with other members by posting it back to the thread.
- Do not share confidential information. Confidential information includes product keys and addresses. Our moderators will edit any message containing confidential information, so double-check messages and their attachments before posting them.
- Post messages using only the English language. For the benefit of all Deployment Forum members, please post your messages using the English language.
We hope that you enjoy using this community. Please submit your comments and feedback on the Comments and Feedback page or post them to the Comments, Feedback forum. |
|  |
| |
|