Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!news.funet.fi!uwasa.fi!ts From: ts@uwasa.fi (Timo Salmi) Newsgroups: comp.lang.pascal Subject: Re: Modifying the DOS environment with TP Message-ID: <1991Jan28.094603.28740@uwasa.fi> Date: 28 Jan 91 09:46:03 GMT References: <43263@ut-emx.uucp> Organization: University of Vaasa Lines: 23 In article <43263@ut-emx.uucp> mjensen@ccwf.cc.utexas.edu (Marc S. Jensen) writes: >I'm working on a DOS shell program, for no particular reason other than I >want to, and have a problem: While I can use GetEnv, EnvCount, etc., to >read the DOS environment variables, I can't find a way of changing those >same variables. >I thought I could get around this by using somoething like > > exec('COMMAND.COM','/C SET =') > >but this won't work, I guess because the new values are zapped when the >exec statement is done executing... : You are right. This is not the solution. You have to deal with the PSP to change the environment, which is an advanced subject. Some Turbo Pascal books have material on this, perhaps Michael Tischer's Turbo Pascal Internals? Perhaps someone will have an exaple. ................................................................... Prof. Timo Salmi Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37 School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun