Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
marcus_sommer

Read Registry

Hello,

the Function:

GetRegistryString(path, key)

delivers from key's with type REG_MULTI_SZ only the first row back. How can I get the complete key?

Thanks

Marcus

1 Solution

Accepted Solutions
flipside
Partner - Specialist II
Partner - Specialist II

Hi Marcus,

I haven't managed to do this through the GetRegistryString function, but you can read via vbscript in a macro ...

Sub GetMultiValueKey

     Dim objRegistry, Key

     Set objRegistry = CreateObject("Wscript.shell")

          Key = objRegistry.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Secondary Start Pages")

     MsgBox Key(1)

End Sub

This appears to place all values into an array, so the first value will be key(0), then key(1) etc.. If number of values is unknown to you, you will need to loop through from 0 to UBound(Key) to retrieve each value.

flipside

View solution in original post

3 Replies
marcus_sommer
Author

Hello,

no ideas? A statement/opinion that is impossible will be also helpful.

Thanks
Marcus

flipside
Partner - Specialist II
Partner - Specialist II

Hi Marcus,

I haven't managed to do this through the GetRegistryString function, but you can read via vbscript in a macro ...

Sub GetMultiValueKey

     Dim objRegistry, Key

     Set objRegistry = CreateObject("Wscript.shell")

          Key = objRegistry.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Secondary Start Pages")

     MsgBox Key(1)

End Sub

This appears to place all values into an array, so the first value will be key(0), then key(1) etc.. If number of values is unknown to you, you will need to loop through from 0 to UBound(Key) to retrieve each value.

flipside

marcus_sommer
Author

Hi flipside,

thank you for your response - it works very well.

Marcus