title: set environment path in .nsi file without system reboot
body: <p>We are using an eclipse rcp product which is having .nsi file.
  So, I want to set the path in environment variables in .nsi file. </p>
  
  <p>I wrote the below piece of code: </p>
  
  <pre><code>Section "-Environment"
  ReadRegStr $1 HKCU "Environment" "PATH"
  ;DetailPrint $1
  StrCpy $0 $INSTDIR\MKS_Standalone\mkssi
  ;DetailPrint $0
  StrLen $2 $1
  ;DetailPrint $2
  StrLen $3 $0
  ;DetailPrint $3
  IntOp $5 $5 &amp; $5
  IntOp $6 $2 - $3
  ;DetailPrint $6
  IntCmp $2 0 labelWrite
  labelLoop:
  ;DetailPrint $5/$6
  StrCpy $4 $1 $3 $5
  ;DetailPrint $4
  ;DetailPrint $0
  StrCmp $4 $0 labelEnd
  IntOp $5 $5 + 1
  IntCmp $6 $5 labelAdd labelAdd
  Goto labelLoop
      labelAdd:
  WriteRegExpandStr HKCU "Environment" "PATH" $1;$INSTDIR\MKS_Standalone\mkssi
  DetailPrint "Adding path environment."
  Goto labelEnd
      labelWrite:
  WriteRegExpandStr HKCU "Environment" "PATH" $INSTDIR\MKS_Standalone\mkssi
  DetailPrint "Adding path environment."
      labelEnd:
  </code></pre>
  
  <p>SectionEnd</p>
  
  <p>This piece of code is adding the path in environment variables but only after rebooting the machine.
  Since my application is running on several machines, I cannot reboot the machine for updating path variables.</p>
  
  <p>How can I set PATH using nsis without system reboot?</p>