Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

Article Preview


Buy Now

Print:
PDF:

Intel corner

Registry

Reading and writing values to the Windows Registry.

Issue: 6.1 (November/December 2007)
Author: Christian Schmitz
Article Description: No description available.
Article Length (in bytes): 3,489
Starting Page Number: 42
RBD Number: 6118
Resource File(s): None
Related Link(s): None
Known Limitations: None

Excerpt of article text...

The registry is a hierarchical list of key value pairs for storing data in Windows operating systems. Most applications use it to store preference values.

Fixed ArticleFirstPara tags.

This article shows you three examples for reading values from the Registry. First we read the Windows version from the regisry. Second we locate the current Java DLL location which is needed for using Java Classes in Realbasic (e.g., using the MBS Java Plugin). Second we search an icon file for a file extension.

Reading values from the Registry

If you want to just read the value of a specific key, you can use the Registry Editor from Windows (regedit.exe) to locate the key and write down the path.

To launch regedit, click on the start button and select run. Enter regedit in the run dialog and press return to launch it.

To read the Windows NT productname, you can use this code:

dim r as registryitem

r=new registryitem("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion")

ProductName=r.value("ProductName")

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com