{"id":95,"date":"2009-09-30T21:55:27","date_gmt":"2009-09-30T19:55:27","guid":{"rendered":"http:\/\/dirk.forbiddendream.be\/?p=95"},"modified":"2016-01-07T10:50:19","modified_gmt":"2016-01-07T10:50:19","slug":"working-with-windows-registry-part-1-general-information-about-the-registry","status":"publish","type":"post","link":"https:\/\/dirk.schuermans.me\/?p=95","title":{"rendered":"Working with Windows Registry in VB.NET &#8211; Part 1: General information about the Registry"},"content":{"rendered":"<p>Hello everyone!<\/p>\n<p>I know it&#8217;s been a while since my last post, been rather occupied with other stuff so didn&#8217;t really have time to post on my blog.<\/p>\n<p>Anyhow, back to business.<\/p>\n<p>Today I&#8217;m going to explain to you how to work with the Windows Registry in your VB.NET application.<\/p>\n<p>This entry will be divided into 5 parts:<\/p>\n<ol>\n<li><a href=\"http:\/\/dirk.schuermans.me\/?p=95\" target=\"_self\">Working with Windows Registry in VB.NET &#8211; Part 1: General information about the Registry<\/a><\/li>\n<li><a href=\"http:\/\/dirk.schuermans.me\/?p=104\" target=\"_self\">Working with Windows Registry in VB.NET &#8211; Part 2: Writing to the Registry<\/a><\/li>\n<li><a href=\"http:\/\/dirk.schuermans.me\/?p=114\" target=\"_self\">Working with Windows Registry in VB.NET &#8211; Part 3: Reading from the Registry<\/a><\/li>\n<li><a href=\"http:\/\/dirk.schuermans.me\/?p=144\" target=\"_self\">Working with Windows Registry in VB.NET &#8211; Part 4: Deleting from the Registry<\/a><\/li>\n<li><a href=\"http:\/\/dirk.schuermans.me\/?p=157\" target=\"_self\">Working with Windows Registry in VB.NET &#8211; Part 5: Everything in a nutshell<\/a><\/li>\n<\/ol>\n<p><!--more--><\/p>\n<p>To some working with the registry might sound complicated but guess what, it&#8217;s not!<\/p>\n<p>It&#8217;s so simple, that I don&#8217;t really get why they don&#8217;t address this in programming classes because working with the Windows Registry is really handy for storing application based settings without having to work with plain text files or whatever.<\/p>\n<p>Let&#8217;s get started!<\/p>\n<p>First of all, you&#8217;ll need to understand the basics of the Windows Registry and how it works.<br \/>\nYou can browse the registry by pressing the windows key + r and typing &#8220;regedit&#8221;. This will open up the Register-editor.<\/p>\n<p>In total, there are 5 hives: (For XP &amp; Vista, older versions have additional hives available)<\/p>\n<ul>\n<li><strong>HKEY_CLASSES_ROOT<\/strong>\n<ul>\n<li>Used to store information regarding registerd applications.<\/li>\n<\/ul>\n<\/li>\n<li><strong>HKEY_CURRENT_USER<\/strong>\n<ul>\n<li>Used to store settings that are specific to the currently logged-in user.<\/li>\n<\/ul>\n<\/li>\n<li><strong>HKEY_LOCAL_MACHINE<\/strong>\n<ul>\n<li>Used to store settings that are specific to the local machine.<\/li>\n<\/ul>\n<\/li>\n<li><strong>HKEY_USERS<\/strong>\n<ul>\n<li>Contains subkeys corresponding to the HKEY_CURRENT_USER for each user profile actively loaded.<\/li>\n<\/ul>\n<\/li>\n<li><strong>HKEY_CURRENT_CONFIG<\/strong>\n<ul>\n<li>Used to store information gathered at runtime. Information stored in this key is not perma stored on disk<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>As a programmer, you&#8217;d be most interested in the <strong>HKEY_CURRENT_USER<\/strong> and <strong>HKEY_LOCAL_MACHINE<\/strong> hives because these are the most usefull to your application.<br \/>\nMost likely you&#8217;ll create an application that is user-based (in other words, every user on the computer can have different settings etc) or an application that is computer-based (The same settings apply for everyone on the machine)<\/p>\n<p>So that&#8217;ll be<strong> HKEY_CURRENT_USER<\/strong> for user-based applications and <strong>HKEY_LOCAL_MACHINE<\/strong> for computer-based applications.<\/p>\n<p>Once you&#8217;ve decided what hive is most suitable for you, we can get started with writing to and reading from the Registry.<\/p>\n<p><a href=\"http:\/\/dirk.schuermans.me\/?p=104\" target=\"_self\">&#8211; Continue to part 2<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello everyone! I know it&#8217;s been a while since my last post, been rather occupied with other stuff so didn&#8217;t really have time to post on my blog. Anyhow, back to business. Today I&#8217;m going to explain to you how to work with the Windows Registry in your VB.NET application. This entry will be divided &hellip; <a href=\"https:\/\/dirk.schuermans.me\/?p=95\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Working with Windows Registry in VB.NET &#8211; Part 1: General information about the Registry<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[38],"tags":[],"_links":{"self":[{"href":"https:\/\/dirk.schuermans.me\/index.php?rest_route=\/wp\/v2\/posts\/95"}],"collection":[{"href":"https:\/\/dirk.schuermans.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dirk.schuermans.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dirk.schuermans.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dirk.schuermans.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=95"}],"version-history":[{"count":3,"href":"https:\/\/dirk.schuermans.me\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":786,"href":"https:\/\/dirk.schuermans.me\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions\/786"}],"wp:attachment":[{"href":"https:\/\/dirk.schuermans.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dirk.schuermans.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dirk.schuermans.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}