64-bit system access Registry Software\microsoft\windows\currentversion\uninstall

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.