Jump to content

Recommended Posts

Posted

On one PC I have (Win98), I was trying to optimize my conventional DOS memory by clearing out all my environment variables before loading TSR's.

Most variables are easy to clear using "set X=". Unfortunately the variable "winbootdir" is set as soon as command.com is loaded, and there is no easy way to clear it. Using "set winbootdir=" doesn't work because it automatically capitalizes winbootdir for you and sets WINBOOTDIR, which is the wrong variable name.

I figured out one way to delete this environment variable. Basically I have a small batch file that runs "mem /m command" and looks at the segment of the environment memory block, and clears it out using a couple of calls to debug.exe. This works well and if anyone is interested in this batch file I can post it.

But does anyone know of a more elegant way of clearing out the environment? E.g. using a COM file to traverse through memory blocks and zeroing out the master environment block?


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...