Create Enviroment variables

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I'm trying to create some envirment variables but I'm having some trouble.
Whats the correct way?
This is what I've got in my C# application.....
Environment.SetEnvironmentVariable("PYTHON",
@"C:\Python22\libs\python22.lib");

but when I look for them, they never get set. When I single step through
them with the debugger, the line excutes, no errors but nothing ever
happens. Am I missing something?

Thanks
 
I'm trying to create some envirment variables but I'm having some trouble.
Whats the correct way?
This is what I've got in my C# application.....
Environment.SetEnvironmentVariable("PYTHON",
@"C:\Python22\libs\python22.lib");

but when I look for them, they never get set. When I single step through
them with the debugger, the line excutes, no errors but nothing ever
happens. Am I missing something?

Thanks

That will create an environment variable in the current process, if
you want it to appear for the current user or even the whole machine
you need to use the other overload that takes a
EnvironmentVariableTarget for the third parameter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top