1.

Solve : How to monitor changes on environment variables?

Answer»

Hello all!

I have several SCRIPTS running on DOS and there are some variables that is set and changed during these scripts execution. Is there a monitor to registry all sets, usage and CHANGES on these variables?

Thanks in ADVANCE!Sure, you just edit the files so that everything has echo on and then you just stare at the monitor.
Or did you WANT some program to do that? You could write a program that eedits all batch files so that every set command will echo on the printer.
As far as I know there is no ready made debug tool for DOS batch commands.
But I don't know everything. let's say that we want to see if the ENVIRONMENT variable bootfolder has changed.

first action is set bootfolder-original=%bootfolder%

later, if it has changed this will tell you...

if "%bootfolder%"=="%bootfolder-original%" goto same

echo variable %bootfolder% has changed

(code to execute if different)

:same

echo variable %bootfolder% has not changed

(code to execute if same)



Discussion

No Comment Found