SPECULATIVE: If you haven't reviewed this (from w2k help|environ....localizing.... ) already, it may offer a hint if you can run the script out of a batch (batwrap).

"Setlocal

"Begins localization of environment variables in a batch file. Localization lasts until a matching endlocal command is encountered, or the end of the batch file is reached

"setlocal option

"Parameter

"option

"When command extensions are enabled (the default in Windows 2000), the setlocal batch command accepts an optional argument, which can be either enableextensions or disableextensions. This enables or disables the command extensions until the matching endlocal command, regardless of their setting prior to the setlocal command.

"The setlocal command also sets the errorlevel value when it is passed an argument. The errorlevel value is set to zero (0) if one of the two valid arguments is given and set to one (1) otherwise."


In reply to Re: Setting Environmental variables by ww
in thread Setting Environmental variables by xorl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.