Re: Whats the %=C:% environment variable used for ?

"R.Wieser" <[email protected]> Sat, 7 Feb 2026 08:30:01 +0100
Newsgroups alt.comp.os.windows-xp,alt.windows7.general,alt.comp.os.windows-10
Organization A noiseless patient Spider
Message-ID <[email protected]>
Arlen,

> Windows contains secrets normally kept hidden under the floorboards.

Ohhh, omnious.

> Following on what Frank said, it turns out Windows creates "drive-specific
> current directory" environment variables which look funnily like this.
>     =C:
...
> Each one stores the current working directory (cwd) for that drive.

You didn't need Frank for that, its what I mentioned in my initial post.

> Try this:
>     C:\> cd \Windows
>     C:\Windows> D:
>     D:\> cd \Games
>     D:\Games> C:
>     C:\Windows>
> Notice how switching back to C: returns you to C:\Windows automatically?
> That's because Windows stored it in that =X: stuff.

What if I tell you that the contents of those =X: environment variables are 
only updated from where the data is stored internally.   Could you prove me 
wrong ?   Can you prove that you are right ?

If (when) you can't prove either than your above statement is nothing more 
than an idea that you, as so often, present as if its a fact.

> They're maintained internally by the OS,

No, they are not.

> not by the shell

"the shell" ?  Whats that ?   I know a few programs I could refer to as 
shells.

> so you can't read them (echo %=C:%) or see them with set or even write to 
> them.

Funny that, you claim you can't read / see them using the command 
interpreters "set" command ...

> Try these proof-of-concept examples:
>     C:\> cd \Windows
>     C:\Windows> echo %=C:%
>     C:\Windows
>
> Switch drives:
>     C:\Windows> D:
>     D:\> echo %=C:%
>     C:\Windows
> It stays the same until you change directories on C:.

... and here, directly below it, you are telling me that you *can* read / 
see them.

So, which one is it ?

Bottom line :
I don't believe that those environment variables are *used* to remember the 
different drives current paths.   Nowerdays the actual, used paths are most 
likely stored internally, and the environment variables contents are updated 
from them.

However, one believable reason to have them available as environment 
variables has been mentioned by someone.

Regards,
Rudy Wieser