How to manipulate environment variables in parent process?



Is it possible to write a perl script to manipulate the environment
variables in a windows CMD.EXE shell?



Normally, you can manipulate environment variables, but they only have
effect for sub processes. I need to change the values of environment
variables for the parent process.



I have a windows bat file and everyday I have to edit it to contain the
current date (because I have a batch job that creates a new directory with
the current date in the directory name).



Can perl help?



I think the best I could hope for would be to write a perl script that
generated a bat file and then I manually execute the bat file. I don't think
there is anyway to automate the execution of the bat file. Please tell me
I'm wrong!



Thanks,

Siegfried



PS.

The bat file just contains a lot of windows cmd.exe set commands.



Relevant Pages

  • Writing a batch file
    ... On Windows Xp environment, can I write a BAT file (under DOS) that can read ...
    (microsoft.public.windowsxp.general)
  • Bat file
    ... On Windows Xp environment, can I right a BAT file (under DOS) that can read ...
    (microsoft.public.scripting.jscript)
  • Re: nss_ldap using sasl with gssapi. Kerberos credentials cache problem[Scanned]
    ... First get a Windows 200x environment with the RFC2307 extensions added to the Schema. ... Next assign all of your *real* Unix users with AD accounts - make the user names conform to the Posix rules (Windows samAccountName) i.e. 8 characters starting with a letter, ... A further enhancement would be to try to access the directory using this file if readable, and if that fails or if the file is not readable then use the KRB5CCNAME environment variable if set and if that fails use the users credentials cache if that exists. ...
    (Fedora)
  • Re: Using PHP to parse specific XML tag content?
    ... XML --> HTML transformation in testing environment. ... run just fine under Windows using Cygwin, and, unless I'm ... but you have to learn XSLT or use whatever defaults ...
    (comp.lang.php)
  • Re: Batch Delete VB code
    ... I put a comment in the .bat file where the technique came from. ... Windows start button|Run ... %1 is the folder that you rightclicked on. ... "Dave Peterson" wrote: ...
    (microsoft.public.excel.programming)