Page 1 of 1 1
Topic Options
#205568 - 2012-08-23 05:36 PM KeyExist
jeff_eisenberg Offline
Fresh Scripter

Registered: 2009-02-26
Posts: 45
Loc: CA
I have a script that uses "keyexist" in many parts and it works fine.
However, whenever I use it for a key in "HKEY_CLASSES_ROOT" it does not work. It always returns a "0" even when the key actually exists.

I'm trying to run this on an XP 64 bit computer if that makes any difference.

The specific command I'm trying to use is as follows. But in testing, I have found that it doesn't work for any key in "HKEY_CLASSES_ROOT"

Code:
$KB=KeyExist("HKEY_CLASSES_ROOT\Installer\Patches\79EB7C9295ED2A736A78A2DD351249A8")

I've also tried it on the "mirrored" section under "HKEY_LOCAL_MACHINE" with the same results... or lack of results.

The version is 4.53

Any help is appreciated.

Top
#205569 - 2012-08-23 05:47 PM Re: KeyExist [Re: jeff_eisenberg]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
64bit versions of windows have different keys for 32bit programs, and by default kix will check those if you do not turn on "WOW64AlternateRegView".

$RC=setoption("WOW64AlternateRegView","On")

You will likely need to upgrade to a newer version of kix. I think "WOW64AlternateRegView" was introduced in the 4.6x series of kix.

Top
#205571 - 2012-08-23 09:32 PM Re: KeyExist [Re: Allen]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
KeyExist() seems to work fine on HKCR on my win7 64 bit computer. Even with 4.53.

The following example returns a 1.

 Code:
? KeyExist("HKEY_CLASSES_ROOT\Installer\Patches\79EB7C9295ED2A736A78A2DD351249A8")

get $

So, although I do think you should upgrade to the newest version. I'm not convinced that the problem doesn't lie elsewhere.

Top
#205576 - 2012-08-23 09:48 PM Re: KeyExist [Re: ShaneEP]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
And Shane is right, it should be able to read the HKCR stuff without problem. I was referring to the HKLM\Software vs HKLM\Wow6432Node\Software locations.
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 793 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.248 seconds in which 0.15 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