The Programmer's Toolbox (toolbox.fp) that ships with CVI has registry functions including functions to read registry values. Add toolbox.fp (...\CVI\toolslib\toolbox\toolbox.fp)to your project, then you can browse these functions from the Instrument menu or, from a code window, you can search for a function by name by pressing P. Depending on what type of data you're reading, look at the following functions in toolbox.fp.
RegReadBinary()
RegReadString()
RegReadULong()
Writing that value to a file can be as simple as using three functions:
fopen()
fprintf()
fclose()
The attached example tries to read the CVIVersion value for default installations of CVI 6 and 7 and store those values to a file.