?
Solved

Reading and Writting to a REG_MULTI_SZ Value

Posted on 2004-08-01
1
Medium Priority
?
902 Views
Last Modified: 2012-08-14
I'm trying to find a way of reading and writting to a REG_MULTI_SZ Value in a simple way through CreateObject("WScript.Shell").

Thanks in advance,
Kalaka
0
Comment
Question by:kalaka
1 Comment
 
LVL 17

Accepted Solution

by:
zzzzzooc earned 520 total points
ID: 11690298
At the below, you'll see "Note   The REG_MULTI_SZ type is not supported for the RegWrite method" so it's not possible through the scripting object.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsMthRegWrite.asp


Here's an example of reading REG_MULTI_SZ values. The returned data is an array.

Private Sub Form_Load()
    Dim objWShell As Object, strTest As Variant, intLoop As Integer
    Set objWShell = CreateObject("WScript.Shell")
    strTest = objWShell.RegRead("HKEY_LOCAL_MACHINE\Software\Test\Key")
    If IsArray(strTest) = True Then
        For intLoop = LBound(strTest) To UBound(strTest)
            MsgBox strTest(intLoop)
        Next intLoop
    End If
End Sub
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question