title: RunAs Command Failing With Error 299
body: <p>I have tried using the "runas" command from Windows to run a program with lowered credentials than those of the currently active account (in order to "sandbox" that program to be only able to access certain directories and files).
  It works fine, for the most part, but I am getting a strange error.
  The command that works without any issues is:</p>
  
  <p><code>runas /noprofile /user:&lt;Username&gt; &lt;program.exe&gt;</code></p>
  
  <p>But when I try to remove the <code>/noprofile</code> and instead write <code>runas /user:&lt;Username&gt; &lt;program.exe&gt;</code> or alternatively <code>runas /user:&lt;Username&gt; /profile &lt;program.exe&gt;</code> I get an error saying (roughly translated) this:</p>
  
  <pre><code>RUNAS-ERROR: &lt;Path-To-My-Program&gt; cannot be executed
  299: Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
  </code></pre>
  
  <p>I tried researching the error but the only thing I could come across was some people that encountered this error trying to work with CDs, USBs and external hard drives, and setting some registry values for those worked for them.
  I did not attempt to modify the registry myself, because I am not using any of these, and thus I concluded that the error had to be something else on my end.</p>
  
  <p>I am really confused as to what is causing this behaviour, and am hoping that someone who is more experienced with this can help me out :)</p>
  
  <p>Thanks in advance
  Best Regards</p>