<p>We have a NET app that gets installed to the Program Files folder. 
The app itself writes some files and creates some directories to its app folder.
But when a normal windows user tries to use our application it crashes because that user does not have permission to write to app folder.
Is there any folder in both WinXP and WinVista to which all users have writing permissions by default? All User folder or something like that?</p>

[{'answer_id': 81738, 'author': 'RickL', 'author_id': 7261, 'author_profile': 'https://Stackoverflow.com/users/7261', 'pm_score': 0, 'selected': False, 'text': "<p>I'm not sure that there is a single path to which all non-administrator users have permission to write to.</p>\n\n<p>I think the correct one would be <code>&lt;User&gt;\\Application Data</code></p>\n"}, {'answer_id': 81779, 'author': 'pilif', 'author_id': 5083, 'author_profile': 'https://Stackoverflow.com/users/5083', 'pm_score': 3, 'selected': True, 'text': "<p>There is no such folder.</p>\n\n<p>But you can create one.</p>\n\n<p>There is CSIDL_COMMON_APPDATA which in Vista maps to %ProgramData% (c:\\ProgramData) and in XP maps to c:\\Documents and Settings\\AllUsers\\Application Data</p>\n\n<p>Feel free to create a folder there in your installer and set the ACL so that everyone can write to that folder.</p>\n\n<p>Keep in mind that COMMON_APPDATA was implemented in Version 5 of the common controls library which means that it's available in Windows 2000 and later. In NT4, you can create that folder in your installation directory and in Windows 98 and below it doesn't matter anyways due to these systems not having a permission system anyways.</p>\n\n<p>Here is some sample InnoSetup code to create that folder:</p>\n\n<pre><code>[Dirs]\nName: {code:getDBPath}; Flags: uninsalwaysuninstall; Permissions: authusers-modify\n\n[Code]\n\n\nfunction getDBPath(Param: String): String;\nvar\n   Version: TWindowsVersion;\nbegin\n  Result := ExpandConstant('{app}\\data');\n  GetWindowsVersionEx(Version);\n  if (Version.Major &gt;= 5) then begin\n    Result := ExpandConstant('{commonappdata}\\myprog');\n  end;\nend;\n</code></pre>\n"}]
['https://Stackoverflow.com/questions/81686', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/15528/']