Re: DOS Environment not working



It just shows the variables set by windows on startup, the ones you can edit
when you go to MyComputer properties. The batch file does not fail because I
installed a errorlevel statement to echo a message.... mmmmm

Frustrating, and I agree with you: 'time to move on' but as a contractor I
need to do what my client needs, which is get this application going

Thank you for your time!

"Pegasus (MVP)" wrote:

Try this:
1. Click Start / Run / cmd {OK}
2. Execute your batch file
3. Type this command:
set bco{Enter}

What do you see?

"Gussie" <Gussie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DD9501AE-BACF-4A61-BFCE-E728802A8DAC@xxxxxxxxxxxxxxxx
Your assumption is correct; I am using the Command Prompt.
The batch file is very simple:
@echo off

SET CLDON=0
SET INTLMAIL=1HPLSRJET
SET AUTO_COMP_ROOT=H:\DATA\SHARED\AUTO
SET BCO_APP_ROOT=H:\BIN\BCO

I run the batchfile at the command prompt, but when I check the variables:
SET, none of them are there!! but if I SET each one at the command prompt
then its fine.

"Pegasus (MVP)" wrote:


"Gussie" <Gussie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1E10AC2B-D646-4731-A50F-5D8FED33E070@xxxxxxxxxxxxxxxx
Hello, I have legacy system written in Clipper 5.2e/Blinker 7.0. I need
to
do
a bunch of SET' when I open up the command shell. To do that I run a
batch
file once command.com is triggered, but variables are not been set as
they
supposed to.

I can set these variables one-by-one and it works fine, but cannot run
batchfile.
Any ideas? is it possible to set variables using a SCRIPT?

Gus
sdl-gus@xxxxxxxxxx

Presumably you're talking about the Command Prompt, not DOS.
DOS is an operating system - it does not exist in WinXP.

The "set" command works exactly as designed but you need to
be aware that your changes are only effective within the process
in which they are applied. Child processes inherit their environmental
variables from their parents but the parents do not inherit anything
from their children. I suspect that you're trying to set your
variables by shelling out from within Clipper. You cannot do this -
you must set your variables when you start your Command Prompt.
This is usually done by placing a suitable batch file into your
Startup menu, e.g. like so:
@echo off
set path=%path%;c:\Clipper
clipper.exe

Note also that command.com is a legacy command processor.
It was superceded seven years ago by cmd.exe. Time to move on!






.



Relevant Pages

  • Re: Copy multiple files into a single file - xcopy?
    ... I tried running it twice, once by double-clicking on the Batch file icon, and once from Command Prompt. ... batch file was in the parent folder whose subfolders contain the text files I want copied into a single file. ... Echo Snapshot taken on %date% at %time:~0,5%> c:\Collect.txt ...
    (microsoft.public.windowsxp.general)
  • Re: missing Folder, viewable in command prompt window
    ... > yet when I type dir it does (cut & paste from command prompt ... with the same hidden type features.. ... of the batch file: ... echo dir 1>>c:\test.log ...
    (microsoft.public.windowsxp.general)
  • Re: Application starts too soon
    ... The application runs froma a batch file. ... The batch file has my exe followed by a Shutdown command ... think the app tries to run, encounters an error, and exits. ... the app runs fine if I manually launch it after the command prompt ...
    (microsoft.public.windowsxp.embedded)
  • Re: Syncing Time with Another Computer?
    ... Echo Synchronizing Clock with Server ... >> sync by running a batch file. ... >>> If I open a command prompt and want to synchronize ... >>> indicate what computer you want to synchronize your time with, ...
    (microsoft.public.windowsxp.general)
  • Re: Calling a batch file from vb.net with parameters
    ... I have a simple batch file that I'm trying to call from a VB.NET ... @ECHO OFF ... In VB.NET I can call the batch file without the sMYDir parameter: ... command prompt with no errors, but it doesn't work when I call it from ...
    (microsoft.public.dotnet.languages.vb)