Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read in registry values
Message
From
19/09/2007 11:00:29
 
 
To
19/09/2007 09:49:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01255406
Message ID:
01255495
Views:
14
>>>
>>>Call them repeatedly until you get an error (returns 259 for EOF). There's a registry.vcx that I have, where there's some wrapper code for this, but don't really know where it came from. Doesn't look like VFP's team homebrew.
>>
>>That sits in the FFC directory and come with VFP but there is no help file I could find
>>thanks Dragan
>
>Basically you get a key to a branch, then use that key to get the subkeys and/or values in it. I've done something like that (mostly to erase the branch and keys left by previous version which had a somewhat dirty install procedure), but can't publish the code.
I tried this but tthe file get so big the VFP trows an error (file too big) at 8 M records
I know I have a lot of Programs but not that many!
ALl I need is a list of installed programs

here is my code:
DIMENSION laList[1]
DIMENSION laList1[1]
oReg = NEWOBJECT("Registry", HOME(0)+"FFC\registry.vcx")
IF oReg.Openkey("SOFTWARE", HKEY_LOCAL_MACHINE) = 0
	IF oReg.Enumkeys(@laList) = 0
		ASORT(laList)
		FOR I = 1 TO ALEN(laList,1)
			INSERT INTO ccProgs (pname) VALUES (laList[m.I])
			IF oReg.Openkey("SOFTWARE\"+laList[m.I], HKEY_LOCAL_MACHINE) = 0
				IF oReg.Enumkeys(@laList1) = 0
					ASORT(laList1)
					FOR I = 1 TO ALEN(laList1,1)
						IF NOT SEEK(LEFT(UPPER(laList1[m.I]),100),"ccProgs","pname")
						INSERT INTO ccProgs (pname) VALUES (laList1[m.I])
						ENDIF 
					ENDFOR

				ENDIF
				oReg.Closekey()


			ENDIF
		ENDFOR

	ENDIF
	oReg.Closekey()
ENDIF
could WMI get me a list of that, maybe??
Peter Cortiel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform