Yeah, it's just value pair so you have to use keys and then get value. Depending on language you can of course populate something smarter and then iterate through that with high level functions.
Just be aware that some of the .net ones don't like that the all values might not be populated, keep in mind if you get weird exceptions. //A From: [email protected] [mailto:[email protected]] On Behalf Of Miller, Todd Sent: den 28 maj 2015 15:40 To: [email protected] Subject: RE: [MDT-OSD] Multi-value custom Settings No. I am not trying to use the values inside Customsettings.ini The values are created by CustomSettings.ini from the MDT database, but I need to process those settings in a vbscript.wsf script called from the TS. The answer I stumbled into after a LOT of searching is ... ArraryVariable = oEnvironment.ListItem("CustomSetting").Keys And the number of values in the ListItem is oEnvironment.ListItem("CustomSetting").Count It was the "Keys" part i was missing. I think that listitems are set up in MDT as dictionaries, but my array is one diminutional, so it is the "Keys" values that I am after. I had just never tried to process a multi-value (listitem) custom variable before. I think I have this working OK. I think this is right, but if I am going down the wrong path, please respond. ________________________________ From: [email protected]<mailto:[email protected]> [[email protected]] on behalf of Keith Garner (Hotmail) [[email protected]] Sent: Wednesday, May 27, 2015 4:34 PM To: [email protected]<mailto:[email protected]> Subject: RE: [MDT-OSD] Multi-value custom Settings Does this help: https://keithga.wordpress.com/2014/04/18/listitem-processing-in-customsettings-ini-file/ From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Miller, Todd Sent: Wednesday, May 27, 2015 1:29 PM To: [email protected]<mailto:[email protected]> Subject: [MDT-OSD] Multi-value custom Settings I am having trouble finding an example of how to process multi-valued custom settings. I have two custom lists that will contain between 0 and several values... For example -- CustomSetting001, CustomSetting002, CustomSetting003. The values are set by SQL queries from CustomSettings.ini section [RSETTINGS]. When the computer is assigned to multiple roles, it might have multiple values for the custom setting, and I need to process each. Mostly, I need to figure out how to determine from a ZTI script how to COUNT the # values there are and then figure out how to access each value individually in a loop. In the example above, how would I know there are 3 values assigned, and how would I step through those values individually to perform an action on each. In general, I know what I am doing - just need a little help with these list/array type values. My google skills are letting me down. "List" and "MDT" is a bad google query because hundreds of web pages "list" the MDT standard variables. One idea I had was to just step through all the variables and take an action where the Left(variableName, 14) = "MyVariablename" But there is probably a more straightforward approach, right? ________________________________ Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. ________________________________ ________________________________ Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you. ________________________________
