I may have not been clear in my earlier emails, sorry about that. 
I have a C# custom action that uses Microsoft.Win32.RegistryKey. I am
building this custom action with AnyCPU. The custom action searches for JRE
on the system and set a value to Session variable. I have 64-bit JRE
installed on the machine. 
When the installer runs, it doesn't seem to search the 64-bit registry when
run on 64-bit Operating system, which is quite confusing. My understanding
is that the msiexec process that runs the custom action will be 64-bit in
this case and will launch the CA as 64-bit too.
I also confirmed with Corflags that the customAction was built correctly. 

I don't think marking the custom action as 'Defer' matters here.



Custom Action definition
----------------------------
    <Binary Id="provisionCA"
SourceFile="$(var.ProvCustomAction.TargetDir)Provision.CA.dll" />
    <CustomAction Id='customActioncheckJavaHomeEnvVar'
BinaryKey='provisionCA' DllEntry='SearchJRE' Execute="immediate"
Return="check"/>





Snippet from custom action
-------------------------------

            session.Log("Begin SearchJRE");

            RegistryKey root = Registry.LocalMachine;
            string path = @"Software\Javasoft\Java Runtime Environment";

            using (RegistryKey jreRoot = root.OpenSubKey(path))
            {
                if (jreRoot == null)
                {
                    session.Log("Java is not installed. JRE entry not found
in registry at " + path);
                    session["JAVA_HOME_PATH"] = "0";
                    return ActionResult.Success;
                }
           ..... 
           ..... AND MUCH MORE


Thanks!






--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/CustomAction-built-for-AnyCPU-does-not-read-64-bit-registry-hive-tp7598754p7598766.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to