Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Registry
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00230711
Message ID:
00231032
Views:
15
>What rules need to be followed when creating and saving registry entries?
>

What are you looking for as far as guidelines? The iggest thing to remember is that writes can't be 'backed out' - if you aren't certain that the value you're setting is the right one, save the value that was there before writing a new one. If you don't want to roll your own functions, the FFC class works, as do the pre-VFP6 classes here on UT. If you need to write things other than string values (REG_SZ type values) into the registry - binary data, integers or some of the other registry types, you'll have to work a bit with the API to read and write non-string values; it isn't tough, but it isn't handled by the FFC stuff.

>Does anyone know of a good information source on Windows registry?
>

MS Press has a couple of books on the Registry - Inside the Windows 95 Registry and Inside the Windows NT Registry are pretty thorough. There are several books published by Que and Sams that are very good, and cover things in a more practical fashion. amazon.com is a good source for these books.

>I would like to create a unique id on each users machine whenever my app runs for the first time. I was thinking that I would make an entry under hkey_local_machine\software\myapp. Is that the right approach?

That's the general approach; if you want to create an entry on a Windows user-by-user basis, the key HKEY_CURRENT_USER maps to user-specific settings under HKEY_USERS for each windows user login id; if you make entries under HKEY_CURRENT_USER\Software\MyApp, this is a good way to save user preferences without risking overwriting someone else's preferences.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform