How to get REG_MULTI_SZ in WINQUERYREG?
3 views (last 30 days)
Show older comments
The function winqueryreg supports just strings (REG_SZ), expanded strings (REG_EXPAND_SZ) and 32-bit integer (REG_DWORD), but what should I do if I need to get a multistring value (REG_MULTI_SZ)?
All I've invent is:
[~, str] = dos('reg query "hklm\software\myprog" /v MY_KEY')
found = strfind(str, 'REG_MULTI_SZ')
str = str(found+12:end) % I suppose there is just one multistring value
str = str(str~=' ') % clear from spaces
found = strfind(str, '\0')
res{1} = str(1:found-1) % and I suppose there is just one value found again
res{2} = str(found+2:end)
Apparently, this way isn't the best
0 Comments
Answers (0)
See Also
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!