Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!pyramid!hplabs!hp-sdd!megatek!mana!hollen From: hollen@mana.megatek.uucp (Dion Hollenbeck) Newsgroups: comp.sys.ibm.pc Subject: Re: Environment settings from a C program Message-ID: <196@megatek.UUCP> Date: Mon, 12-Oct-87 11:43:11 EDT Article-I.D.: megatek.196 Posted: Mon Oct 12 11:43:11 1987 Date-Received: Wed, 14-Oct-87 06:04:58 EDT References: <700@hsi.UUCP> <114@fxgrp.UUCP> Sender: news@megatek.UUCP Reply-To: hollen@mana.UUCP (Dion Hollenbeck) Organization: Megatek Corporation, San Diego, Ca. Lines: 19 Keywords: ms-dos environ putenv getenv turboc >In article <700@hsi.UUCP> mark@hsi.UUCP (Mark Sicignano) writes: >I am trying to change an environment variable from within >a Turbo-C program. Turbo-C provides a function, putenv() >which will make changes to, add, or delete environment, >but any changes are made to the environment within the program, >and for child processes. > >I need for these changes to remain. Is it possible? If you have enough memory, how about not returning to the DOS command processor by leaving your program, but by creating a child process and running COMMAND.COM which would then be passed a copy of your expanded environment? Have not tried this since I don't need the capability, but it seems a reasonable way to solve it if it works for you. Dion Hollenbeck (619) 455-5590 x2814 Megatek Corporation, 9645 Scranton Road, San Diego, CA 92121 ames!scubed! {sdcsvax,hplabs}!hp-sdd!megatek!hollen sdcsvax!esosun!