<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Where Should I Store my Data and Configuration Files if I Target Multiple OS Versions?</title><link>http://blogs.msdn.com/b/patricka/archive/2010/03/18/where-should-i-store-my-data-and-configuration-files-if-i-target-multiple-os-versions.aspx</link><description>Over the past few releases of Windows, you may have noticed common folder locations have moved around a bit. What should you do if you want your code to target multiple OS&amp;rsquo;s? Perhaps you are updating an application from XP to Windows 7 and wondering</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Where Should I Store my Data and Configuration Files if I Target Multiple OS Versions?</title><link>http://blogs.msdn.com/b/patricka/archive/2010/03/18/where-should-i-store-my-data-and-configuration-files-if-i-target-multiple-os-versions.aspx#10176792</link><pubDate>Mon, 20 Jun 2011 02:42:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10176792</guid><dc:creator>David Gardiner</dc:creator><description>&lt;p&gt;Are the examples for &amp;#39;Per Machine “Documents”&amp;#39; correct?&lt;/p&gt;
&lt;p&gt;On Windows 7, I get &amp;quot;C:\Users\Public\Documents&amp;quot; (aka &amp;quot;C:\Users\Public\Public Documents&amp;quot;)&lt;/p&gt;
&lt;p&gt;-dave&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10176792" width="1" height="1"&gt;</description></item><item><title>re: Where Should I Store my Data and Configuration Files if I Target Multiple OS Versions?</title><link>http://blogs.msdn.com/b/patricka/archive/2010/03/18/where-should-i-store-my-data-and-configuration-files-if-i-target-multiple-os-versions.aspx#10059917</link><pubDate>Thu, 09 Sep 2010 17:02:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10059917</guid><dc:creator>Pat Altimore MSFT</dc:creator><description>&lt;p&gt;Great question. &amp;nbsp;This is a common question and I&amp;#39;m glad you brought it up. &amp;nbsp;ProgramData is the recommended location for per machine configuration data. &amp;nbsp;As you point out, by default, BUILTIN\Users will only have RX. If you have a requirement for standard users to be able to write to the file, you will need to grant that permission. &amp;nbsp;The best time to do this is during install time. &amp;nbsp;Installers normally run elevated and can set any folder permissions. &amp;nbsp;You could also grant Users write permission just after you create the file. &amp;nbsp;The user who created the file should be able to grant Users write permission as well.&lt;/p&gt;
&lt;p&gt;You can think of the subdirectory \ProgramData\MyCompany\MyApp as &amp;quot;your directory&amp;quot; to do as you please for per machine data. Feel free to set the permissions as needed (obviously replacing MyCompany and MyApp with the appropriate values).&lt;/p&gt;
&lt;p&gt;One other note, I don&amp;#39;t talk about registry in this post. &amp;nbsp;However, you can apply the same rules to the registry. HKCU\Software\MyCompany\MyApp for per user settings and HKLM\Software\MyCompany\MyApp for per machine settings. If you need standard users to write to HKLM\Software\MyCompany\MyApp, you will need to grant that permission -- normally at install time.&lt;/p&gt;
&lt;p&gt;Thanks for reading :-)&lt;/p&gt;
&lt;p&gt;Pat&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10059917" width="1" height="1"&gt;</description></item><item><title>re: Where Should I Store my Data and Configuration Files if I Target Multiple OS Versions?</title><link>http://blogs.msdn.com/b/patricka/archive/2010/03/18/where-should-i-store-my-data-and-configuration-files-if-i-target-multiple-os-versions.aspx#10059566</link><pubDate>Wed, 08 Sep 2010 23:37:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10059566</guid><dc:creator>Wilson Leung</dc:creator><description>&lt;p&gt;Per machine configuration data - The Folder &amp;quot;%SystemDrive%\ProgramData\MyCompany\MyApp &amp;quot; for Windows 7 is READONLY for non admin users. If I am looking for a location for read / write access, what should I use?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10059566" width="1" height="1"&gt;</description></item></channel></rss>