SetMultiStringValue

The SetMultiStringValue method sets the data value for a named value whose data type is REG_MULTI_SZ. The SetMultiStringValue method returns a uint32 which is 0 if successful or some other value if any other error occurred.

This parameter is an array. It can contain multiple values. Make sure you submit an array to this parameter, even if you want to submit just one value. Use @() to turn a single value into an array before you assign it to this parameter.

hDefKey

Data type UInt32

Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h:

HKEY_CLASSES_ROOT (0x80000000)

HKEY_CURRENT_USER (0x80000001)

HKEY_LOCAL_MACHINE (0x80000002)

HKEY_USERS (0x80000003)

HKEY_CURRENT_CONFIG (0x80000005)

HKEY_DYN_DATA (0x80000006)

Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only.

sSubKeyName

Data type String

Specifies the key that contains the named value to be set.

sValueName

Data type String

Specifies the named value whose data value you are setting. You can specify an existing named value (update) or a new named value (create). Specify an empty string to set the data value for the default named value.

You have a question about WMI in general or this particular WMI Class? Then please visit our free forum here: Help me with WMI. There are even more forums to assist you, so you may want to look at the full forum list to pick the best one.

Please use the comment form below to actively submit new content for this page. So if you found an error or have sample code showing this class in action, please share by using the comment form on the bottom of this page.

Community Content

You are cordially invited to add knowledge to this page. If you have sample code or additional information related to this WMI class, please share it. Use the comment form to send your information. We will edit and incorparate it into the reference library. Thank you!

Please do not use the comment form to submit questions. If you have questions or need assistance, visit our free forum: Help me with WMI.