{"id":1097,"date":"2017-07-20T13:41:09","date_gmt":"2017-07-20T10:41:09","guid":{"rendered":"https:\/\/burakcaliskan.org\/blog\/?p=1097"},"modified":"2017-08-29T12:48:10","modified_gmt":"2017-08-29T09:48:10","slug":"csharp-yuklu-program-sorgulama","status":"publish","type":"post","link":"https:\/\/burakcaliskan.org\/blog\/csharp-yuklu-program-sorgulama\/","title":{"rendered":"C# Y\u00fckl\u00fc Program Sorgulama"},"content":{"rendered":"<pre class=\"lang:default decode:true \">  public static bool YukluProgram(string ProgramName)\r\n        {\r\n            bool status = false;\r\n            string registry_key = @\"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\";\r\n            using (RegistryKey key = Registry.LocalMachine.OpenSubKey(registry_key))\r\n            {\r\n                foreach (string subkey_name in key.GetSubKeyNames())\r\n                {\r\n                    using (RegistryKey subkey = key.OpenSubKey(subkey_name))\r\n                    {\r\n                        if (!string.IsNullOrEmpty(Convert.ToString(subkey.GetValue(\"DisplayName\"))))\r\n                        {\r\n                            if (Convert.ToString(subkey.GetValue(\"DisplayName\")).Contains(ProgramName))\r\n                                status = true;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            return status;\r\n        }<\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"lang:default decode:true \">string programName = \"Microsoft Visual C++ 2015\";\r\n                    bool st = YukluProgram(programName);\r\n                    if (st)\r\n                    {\r\n MessageBox.Show(programName + \" Program yuklu\");\r\n}else{\r\n MessageBox.Show(programName + \" Program yuklu degil\");\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>public static bool YukluProgram(string ProgramName) { bool status = false; string registry_key = @&#8221;SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall&#8221;; using (RegistryKey key = Registry.LocalMachine.OpenSubKey(registry_key)) { foreach (string subkey_name in key.GetSubKeyNames()) { using (RegistryKey subkey = key.OpenSubKey(subkey_name)) { if (!string.IsNullOrEmpty(Convert.ToString(subkey.GetValue(&#8220;DisplayName&#8221;)))) { if (Convert.ToString(subkey.GetValue(&#8220;DisplayName&#8221;)).Contains(ProgramName)) status = true; } } } } return status; } &nbsp; string programName = &#8220;Microsoft Visual C++ 2015&#8221;; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":337,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[23],"tags":[542,205,241,544,543,349,545,540],"_links":{"self":[{"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/posts\/1097"}],"collection":[{"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/comments?post=1097"}],"version-history":[{"count":1,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/posts\/1097\/revisions"}],"predecessor-version":[{"id":1098,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/posts\/1097\/revisions\/1098"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/media\/337"}],"wp:attachment":[{"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/media?parent=1097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/categories?post=1097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/tags?post=1097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}