473,320 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Create Enviroment variables

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
Mar 5 '07 #1
1 2008
On 5 Mar, 16:24, "Jason" <w...@microsoft.comwrote:
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.

Mar 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nikhil Barthwal | last post by:
Hi, I have a Java program that needs to access the value of variable PATH (Set in Unix enviroment by setenv or DOS enviroment by PATH statement). How do I access it in Java? Thanks in...
1
by: Ruchika | last post by:
Hi, How can i get/set environment variables in Python? I am trying to run Perforce commands from Python script but am unsuccesful. Want to make sure that Perforce is in the path. How can I...
4
by: Andrew V. Romero | last post by:
I have been working on a function which makes it easier for me to pull variables from the URL. So far I have: <script language="JavaScript"> var variablesInUrl; var vArray = new Array(); ...
6
by: Todd | last post by:
Hello, How do I register and non .net dll(with the OS) in a .net enviroment? I have a third party dll I need to register(REGSVR32.EXE). What is the best approach to this in a .Net enviroment. ...
2
by: Andrej Litowka | last post by:
Hi All! If anybody know, how I cann set an enviroment variable (with ANSI C) on Windows similar like on Linux. I tried setenv, but the function doesn't work correct on Windows - it sets env....
4
by: Benne Smith | last post by:
In our company, i have three servers; 1) a development server (mine only - here i make daily changes and test my stuff) 2) a test server (for the users to test milestone builds - changes weekly)...
4
by: Ron Clarke | last post by:
I have an application that starts other processes. The app needs to create/set a few environment variables when a process starts, let the process run, then remove the environment variables when the...
4
by: Nelson | last post by:
Hi people, I know that getenv() returns the value of single environment variable, but I need some function that returns all of env. variables (just like when we type SET in commandline or...
2
by: KLynnM333 | last post by:
We have a Windows 2003 R2 SP2 webserver that is currently backed up using ntbackup (the Windows backup tool). Our backups are stored on a shared drive of our file/print server. The webserver...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.