SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Computer Learning -- Ignore unavailable to you. Want to Upgrade?


To: PMS Witch who wrote (11063)8/6/2000 5:28:34 PM
From: CatLady  Read Replies (1) | Respond to of 110642
 
"We ALL face challenges which are tough to us, but simple to those who know. "

Well, I don't know much, but I got a bunch of old books around here. ;-)

from an old turbo C manual,

putenv prototyped in stdlib.h

int putenv(const char *name);

putenv("PATH=c:\FOO");

=========

getenv reads the enviroment variables

path = getenv("PATH");



To: PMS Witch who wrote (11063)8/6/2000 8:34:54 PM
From: CatLady  Respond to of 110642
 
"First, how does one write to the environment table from within a program? It seems easy enough to write to the copy of this table made available to your program(s), but the mother lode seems totally elusive."

Duh, I should have re-read your post before replying.

What I posted modifies the COPY, not the master environment.

There IS something on modifying the master environment in the book Undocumented DOS, but it's not entirely straight forward.

More later.....



To: PMS Witch who wrote (11063)8/6/2000 9:13:43 PM
From: CatLady  Read Replies (1) | Respond to of 110642
 
Well, reading the book went over my head in a hurry, It talks about walking the MCB and PSP chains.

Searching the web for MCB and PSP found this. -

"Stuff for those wishing to try to set the master environment (don't do it!)"

snippets.org
snippets.org

All in all, I can't see anything that makes me think this stuff will work inside a Windows Dos box, but I haven't seen anything that says it won't.