I am having trouble finding the right registry entry to look up.

I am having a strange result when looking up an item in the registry.
on my 64 bit laptop I have the current entry:
On my 32 bit PCs the entry is as follows:
There is no Wow6432Node folder.
when I perform the following on my 32 or 54 bit madhines I get the right result:
 $var32 = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RapidStudio_RapidStudio", "AppFolder")
Even tho that entry does not exist on the 64 bit machine, it still somehow returns the desired value.
Is it safe to assume that this will always be the case?

Most importantly, how can I make a statement like "FileExists" so that if the reg entry exists I do something, if not, tell them it's not installed?


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

That's probably Wow64 doing it's magic so it sounds right to me. Check return value for anything but empty and you can tell the user when it's missing.
The AutoIT help file shows the following for the regread command::

When running on 64-bit Windows if you want to read a value specific to the 64-bit environment you have to suffix the HK... with 64 i.e. HKLM64.

Below is the AutoIT code that should do the trick

$var32 = RegRead ("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RapidStudio_RapidStudio", "AppFolder")

; When the 32bit registry entry isn't found look for the 64bit registry entry
If $var32 = "" and @error Then
	$var32 = RegRead("HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\RapidStudio_RapidStudio", "AppFolder")

; Now check whether the registry item was found at all
If $var32 = "" Then
	MsgBox(48,"There is a problem", "RapidStudio is not installed")

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
StevenHookAuthor Commented:
Awesome awesome assistance!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.