{"id":37623,"date":"2004-10-08T06:57:00","date_gmt":"2004-10-08T06:57:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2004\/10\/08\/why-is-there-a-separate-getsystemdirectory-function\/"},"modified":"2004-10-08T06:57:00","modified_gmt":"2004-10-08T06:57:00","slug":"why-is-there-a-separate-getsystemdirectory-function","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20041008-00\/?p=37623","title":{"rendered":"Why is there a separate GetSystemDirectory function?"},"content":{"rendered":"<p>If the system directory is always <code>%windir%\\SYSTEM32<\/code>, why is there a special function to get it?<\/p>\n<p> Because it wasn&#8217;t always that. <\/p>\n<p> For 16-bit programs on Windows&nbsp;NT, the system directory is <code>%windir%\\SYSTEM<\/code>.  That&#8217;s also the name of the system directory for Windows&nbsp;95-based systems and all the 16-bit versions of Windows. <\/p>\n<p> But even in the 16-bit world, if it was always <code>%windir%\\SYSTEM<\/code>, why have a function for it? <\/p>\n<p> Because even in the 16-bit world, it wasn&#8217;t always <code>%windir%\\SYSTEM<\/code>. <\/p>\n<p> Back in the old days, you could run Windows directly over the network.  All the system files were kept on the network server, and only the user&#8217;s files were kept on the local machine. What&#8217;s more, every single computer on the network used the same system directory on the server. There was only one copy of USER.EXE, for example, which everybody shared. <\/p>\n<p> Under this network-based Windows configuration, the system directory was a directory on a server somewhere (\\\\server\\share\\somewhere) and the Windows directory was a directory on the local machine (C:\\WINDOWS).  Clients did not have write permission into the shared system directory, but they did have permission to write into the Windows directory. <\/p>\n<p> That&#8217;s why <code>GetSystemDirectory<\/code> is a separate function. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>If the system directory is always %windir%\\SYSTEM32, why is there a special function to get it? Because it wasn&#8217;t always that. For 16-bit programs on Windows&nbsp;NT, the system directory is %windir%\\SYSTEM. That&#8217;s also the name of the system directory for Windows&nbsp;95-based systems and all the 16-bit versions of Windows. But even in the 16-bit world, [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-37623","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>If the system directory is always %windir%\\SYSTEM32, why is there a special function to get it? Because it wasn&#8217;t always that. For 16-bit programs on Windows&nbsp;NT, the system directory is %windir%\\SYSTEM. That&#8217;s also the name of the system directory for Windows&nbsp;95-based systems and all the 16-bit versions of Windows. But even in the 16-bit world, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/37623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=37623"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/37623\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=37623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=37623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=37623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}