Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>See this related Stack Overflow <a href="https://stackoverflow.com/questions/131666/vista-and-programdata">question</a>, in particular from the <a href="http://blogs.msdn.com/cjacks/archive/2008/02/05/where-should-i-write-program-data-instead-of-program-files.aspx" rel="nofollow noreferrer">link</a> from this <a href="https://stackoverflow.com/questions/131666/vista-and-programdata/313120#313120">answer</a>:</p> <blockquote> <p><strong>FOLDERID_ProgramData / System.Environment.SpecialFolder.CommonApplicationData</strong></p> <p>The user would never want to browse here in Explorer, and settings changed here should affect every user on the machine. The default location is %systemdrive%\ProgramData, which is a hidden folder, on an installation of Windows Vista. <em>You'll want to create your directory and set the ACLs you need at install time.</em></p> </blockquote> <p>So if you intend your users to be able to write to this folder you'll have to give them appropriate access when your installer runs.</p> <p>If they have write access to the folder then I don't think you'll run into problems with the virutalisation. However, you should really mark your application with the privilege level it requires by adding something like this to your manifest (<a href="http://channel9.msdn.com/posts/jmazner/How-To-Tell-Vistas-UAC-What-Privelege-Level-Your-App-Requires/" rel="nofollow noreferrer">details</a>):</p> <pre><code>&lt;security&gt; &lt;requestedPrivileges&gt; &lt;requestedExecutionLevel level="asInvoker" /&gt; &lt;/requestedPrivileges&gt; &lt;/security&gt; </code></pre> <p>This will disable virtualisation for your process. You can see whether your process is being virtualised by adding the "Virtualization" column to Task Manager under View - Select Columns...</p> <p>Incidentally, Directory.CreateDirectory() will create parent directories automatically.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload