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.
|








