title: Elevate Permissions to Visual Studio For Post-Build Event Batch Script
body: <p>I have a batch file that copies a directory to a new location, creates 2 other .bat files, 2 .json files, and <strong>Inserts Registry Keys</strong>. When running the batch script for the command line, I get no errors and all desired outcomes. While running it from the post-build event command-line, <strong>I get no errors</strong>, but I'm missing the Registry entries. Co-worker suggested that this could be due to Visual Studio not having Admin permissions whereas the command line can. My question is: is there a way <strong>(without running Visual Studio as an admin)</strong> to elevate permissions for a post-build event? If you're wondering why not just run VS as admin, it's because this solution is shared via TFS, and not all my co-workers will know to run their instance of VS as admin for this one particular solution. I've Googled away with nothing to show for it. Thanks in advance for help! Here's the Post-build event command line I'm using. Again I know it works... it just doesn't plop the Registry values. CMD does. PS. Using VS 2013 on Windows 7</p>
  
  <pre><code>if $(ConfigurationName) == Debug call "$(ProjectDir)BatchFiles\DebugHelper.bat" "$(TargetDir)" C:\CEC\Batch\Test\
  </code></pre>