title: How to prevent file redirection to VirtualStore for read/write files?
body: <p>I am using C# with .net 2.0</p>
  <p>I am saving my program data in a file under: <code>C:\ProgramData\MyProgramName\fileName.xml</code></p>
  <p>After installing and running my application one time I uninstalled it (during uninstallation I'm removing all the files from &quot;program data&quot;) and then I reinstall the application, and ran it.</p>
  <p>The strange thing is that my application started as if the files in program data existed - means, I had old data in my app even though the data file was deleted.</p>
  <p>When running:</p>
  <pre><code>File.Exists(&quot;C:\ProgramData\MyProgramName\fileName.xml&quot;)
  </code></pre>
  <p>I got &quot;true&quot; even though I knew for sure that the file does not exist.</p>
  <p>The thing became stranger when I ran the application as admin and then the file didn't exist.</p>
  <p>After a research, I found out that when running my application with no admin privileges instead of getting:</p>
  <pre><code>C:\ProgramData\MyProgramName\fileName.xml
  </code></pre>
  <p>I get</p>
  <pre><code>C:\Users\userName\AppData\Local\VirtualStore\ProgramData\MyProgramName\fileName.xml
  </code></pre>
  <p>and indeed there was a file that existed from the previous installation (that I obviously didn't delete, because I didn't know it existed).</p>
  <hr />
  <p>So just guide me how could I stop this when apps running with no admin right.</p>
  <p>I do not want to create any file automatically in VirtualStore folder. Please discuss all the possible ways to stop this.</p>