Page 1 of 1 1
Topic Options
#200986 - 2010-12-02 04:09 PM Registry key lookup
sparkie Offline
Getting the hang of it

Registered: 2010-09-14
Posts: 92
Loc: UK
I'm using an 'IF ReadValue' HKEY <> in a script which is working fine.

What I want to do is expand this somewhat to see if a key exists, something like

IF Office\12.0 key exists then continue, otherwise ENDIF
IF ReadValue
Do stuff
Do stuff
ENDIF

Wondering if I could use the same if readvalue somehow?

Thanks

Top
#200987 - 2010-12-02 04:11 PM Re: Registry key lookup [Re: sparkie]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Just use the KeyExist function, like:

 Code:
IF KeyExist("HKCU\Software")

 ?"Yup..."

Else

 ?"Nope..."

Endif

Top
#200988 - 2010-12-02 05:00 PM Re: Registry key lookup [Re: Shawn]
sparkie Offline
Getting the hang of it

Registered: 2010-09-14
Posts: 92
Loc: UK
Thanks Shawn,

I'd just stumbled across the KeyExist prior to reading your reply but the context you submitted was just what I needed.


Edited by sparkie (2010-12-02 05:00 PM)

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.051 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org