title: In vbscript, how do I run a batch file or command, with the environment of the current cmd prompt window?
body: <p>In vbscript, how do I run a batch file or command, in the current cmd prompt window, </p>
  
  <p>without starting a new process.</p>
  
  <p>For example. According to script56.chm  (the vbscript help apparently) 
  Windows Script Host<br>
  Run Method (Windows Script Host)<br>
  "Runs a program in a new process"</p>
  
  <p>So if I have code that uses that e.g. a VBS file, and a BAT file.
  An environment variable g has the value abc    g=abc
  from that command window,
  The VBS file calls the BAT file with windows scripting host Run. 
  The bat process sets g=z.  and finishes.. and the vbs process finishes.
  The environment variable is left untouched as g=abc. </p>
  
  <p>I know
  CreateObject("Wscript.Shell").Run "c:\test.bat", 0
  starts a new window  as is clear when using 1 instead of 0. (since 0 hides the window)</p>
  
  <p>How do I 
  -run the bat file from the vbs, in the same cmd environment that the vbs was called in, so changes affect the cmd environment it was called in?
  -In the two windows case which this one is at the moment, how do I access the environment of the parent cmd window, from the batch file?</p>