Hi ! I am working on this project; the thing is that I want my program to create it's own environment variable path so it can be called from and used in CMD too. How can I do this... Googling hasn't been any help yet. Thanks in advance!
johnroach1985
0
Junior Poster
Recommended Answers
Jump to PostHi
U can usepublic static void SetEnvironmentVariable ( string variable, string value, EnvironmentVariableTarget target ) or public static void SetEnvironmentVariable ( string variable, string value, ) EnvironmentVariableTarget target Takes Three values > Machine > User > Process [B]Example [/B] Environment.SetEnvironmentVariable("MYVARIABLE", "MyValue", EnvironmentVariableTarget.Machine );
Note: This method …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.