home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.comp.os.windows-xp      Actually wasn't too bad for a M$-OS      17,273 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,193 of 17,273   
   R.Wieser to All   
   Re: Whats the %=C:% environment variable   
   07 Feb 26 08:30:01   
   
   XPost: alt.windows7.general, alt.comp.os.windows-10   
   From: address@is.invalid   
      
   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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca