PDA

View Full Version : Conditional checks in registry



ChuckChamblee
12-04-2002, 02:00 PM
I have a need to check a registry value for a value "less than" a certain value. It appears that I can only search for something "equal to". Is there a way around this?

CC

Chandima
12-04-2002, 03:35 PM
The way around this would be to create your ini file and put it in the Express Searches folder. Then when you launch Express it will show up as a predefined search.

To get started make a copy of MDAC26FOUND.ini and rename it (this file is in the "Searches" folder where Express is installed).

Open the ini file. Change the ini as follows:

[Title0409]
Desc=Looks for a registry entry of my own.

[AppSearch]
Signature_=FindMyRegKey
Property=FOUNDMYKEY

[RegLocator]
Records=Reg1

[Reg1]
Signature_=FindMyRegKey
Root=2 (0 means HKCR, 1 means HKCU and 2 means HKLM)
Key=Software\Microsoft (enter the key structure here)
Name=Updates (enter the value in the key you want to check)
Type=2

[ExpressCondition0409]
Name=Look for my reg key
Condition=FOUNDMYKEY>"2.5"
HelpFile=ITargetSysReqMDAC.htm
Message=I found my key

If you are having trouble configuring this ini file just post what you have here and I'll fix/tweak it for you.