![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-10-31 14:34 |
47,815 topics / 349,930 posts / today 0 new / 48,290 members |
| DOS开发编程 & 发展交流 (开发室) » [Help] How can I change environment variables with C? |
| Printable Version 946 / 0 |
| Floor1 ruanqizhen | Posted 2004-06-24 00:00 |
| 初级用户 Posts 1 Credits 105 | |
|
I'm using VC, and I found several functions that can change environment variables, but they can only change the environment variables within the current thread.
But what I want is to change the whole console's environment variables, like this: set PARA=1 add.exe PARA ; add.exe is a program written in C, and it can add one to the following parameter echo %PARA% What I hope to see displayed is 2 Could the experts teach me a way? Many thanks! |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |