IsaacTheIceMan
June 18th, 2003, 12:30 PM
I am trying to figure out how to set environment variables when creating a new process that isn't build using .NET. In fact under the framework I can't find any way of setting any environment variables. I see that ProcessStartInfo has a property called EnvironmentVariables but it is read only which doesn't make sense to me because the only use I can find for it is when setting up how to start a process.
Thanks
IsaacTheIceMan
June 18th, 2003, 09:12 PM
I now see that it was the pointer to EnvironmentVariables Property of ProcessStartInfo that was read only. The way to add Environment Variables for a process is is like this in C++...
Process* pProcess;
pProcess->StartInfo->EnvironmentVariables->
Add(S"EnvVar1",S"Value1");
Very simple but I am just starting out with .NET and while I have some books, I always end up wanting to do the things not in the book. Like makeing my own Http Server instead of IIS.