title: How to make permanent system variable using BATCH or VBS?
body: <p>I am making an installer which will be 100% depending on system variable such as %TEMP% or %Path%, users first double click <code>windows.bat</code> file.</p>
  
  <p>But, How can i setup permanent system variable in Windows XP, Vista, 7, 8 using VBS or BATCH? </p>
  
  <p>I tried with BATCH but in Windows XP, most users do not have <code>setx</code> by default, so i want to avoid using that technique. Is there better way to do that?</p>
  
  <pre><code>C:\Documents and Settings\sun&gt;REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Ses
  sion Manager\Environment" /v MyApplicationWillUsetThis /d "C:\WhatEverPathToIncl
  udeHereQuestionMark"
  
  The operation completed successfully
  
  C:\Documents and Settings\sun&gt;REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Ses
  sion Manager\Environment" /v MyApplicationWillUsetThis /d "C:\WhatEverPathToIncl
  udeHereQuestionMark"
  Value MyApplicationWillUsetThis exists, overwrite(Y/N)? Y
  
  The operation completed successfully
  </code></pre>