Persisting env vars in cmd windows



I've got a .bat file that sets a number of symbols (environment vars)
that are useful in a number of other command windows associated with
one of several projects. Right now, I operate by
1 opening a command window
2 draging the name of the symbol-setting bat file into the new cmd
window and pressing Enter
3 draging the name of one of my utility bat files in the cmd window and
pressing Enter
4 proceeding manually entering other commands as needed.

I'd like to eliminate step 2 by invoking the symbol-setter at the
beginning of every other utility file. I tried this by using "cmd /c
symbol-setter.bat" to no avail. I believe that fails because the "cmd
/c" command starts a new session in which to set local env. vars and
then ends, never communicating with the invoking session.

The best solution I can conceive of is to manually write a .reg file
appropriate to each project in which I want persistant env. vars, thus
only needing to invoke that once at the inception of a project, maybe
with another one to delete all such entries should the project
ultimately be destroyed.

Any comments?

Regards,
Richard

.



Relevant Pages

  • Re: EXEC() Runs process in background
    ... > do a start, run, cmd to get a cmd shell. ... I think you can get the batch file to wait for ... >> Open up a command window and run your bat file in it. ...
    (comp.lang.php)
  • Re: Running DOS and Batch Programs on XP
    ... try put the wthpro.exe in the "Cmd line:" box ... David wrote: ... instead of executing the Webster2 bat file. ... R-click that, pick Properties, then the Program tab. ...
    (microsoft.public.windowsxp.general)
  • Re: Network Copy Batch file
    ... Instead of using a .bat file use a .cmd file. ... To test the file (.bat or ..cmd) open a cmd prompt and run the file from there. ... I've tried messing around with the commands in CMD, ... You can access your network drives as if they were local drives, ...
    (microsoft.public.windowsxp.general)
  • Re: System call
    ... either execute the command processor and pass your .bat filename as a parameter, ... And it is what OP got - his bat file was executed by CMD and he got the .bat ... And I KNOW I know more about proper security measures than you do. ...
    (comp.lang.php)
  • Re: System call
    ... And it is what OP got - his bat file was executed by CMD and he got the .bat ... But it has nothing to do with PHP itself. ... when I can't "execute" .bat file from PHP. ...
    (comp.lang.php)