1 Public intChecNonkWoW64 ()2 {3 4 Try5 {6 intx64 =0;7 String subkey = @ "Software\microsoft\windows\currentversion\uninstall"; 8 string[] subkeynames; 9 RegistryKey software = Registrykey.openbasekey (Registryhive.localmachine, registryview.registry64); 10 software = software. OpenSubKey (subkey); OneSubkeynames =software. Getsubkeynames (); A MessageBox.Show (subkey.tostring ()); - - //gets the sequence of the names of all the subkeys under the key, and passes them to the predetermined array the foreach(stringKeyNameinchsubkeynames) - //traversing the entire array - { - if(Keyname.toupper (). Contains ("Ff1ce")) + //determine the name of the subkey - { + BOOLOK =Isx64code (keyName); A if(OK) at { -x64 =1; - } - Else - { -x64 =-1; in } - software. Close (); to Break; + } - } the MessageBox.Show (x64. ToString ()); * returnx64; $ }Panax Notoginseng Catch(Exception) - { the + Throw; A } the}
64-bit system access Registry Software\microsoft\windows\currentversion\uninstall