title: NSIS - EnvVarUpdate overwrites system path when path is too long, is there a workaround?
body: <p>Here is my simple code: </p>
  
  <pre><code>!include "EnvVarUpdate.nsh"
  
  Outfile "text.exe"
  
  Section
  
  ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "C:\Program Files\something"
  
  SectionEnd
  </code></pre>
  
  <p>I understand that the "A" argument means this should APPEND the last argument to system path. However, testing this revealed that it overwrote my Path variable. Further tests reveal this is because Path was too long (>1024 chars, per the tutorial). </p>
  
  <p>Is there a "safe" way to append to Path then? I am looking for a function that will append if Path is short enough, otherwise do nothing and report an error, something of that sort. I'm wondering if a standard method of doing this already exists. Thanks!</p>