// Umgebungsvariablen.cpp: Hauptprojektdatei.

#include "stdafx.h"

using namespace System;
using namespace System::Collections;


int main(array<System::String ^> ^args)
{
	Console::WriteLine("Umgebungsvariable PATH:");
	Console::WriteLine(Environment::GetEnvironmentVariable("PATH"));

	Console::WriteLine("\n\nAlle Umgebungsvariablen:");
	for each (DictionaryEntry u in Environment::GetEnvironmentVariables())
		Console::WriteLine(u.Key + ": " + u.Value);

	if(Environment::GetEnvironmentVariable("EineNeueUmgebungsvariable") == nullptr)
		Environment::SetEnvironmentVariable("EineNeueUmgebungsvariable", "Wert der neuen Umgebungsvariablen");

	Console::WriteLine("\n\nAlle Umgebungsvariablen:");
	for each (DictionaryEntry u in Environment::GetEnvironmentVariables())
		Console::WriteLine(u.Key + ": " + u.Value);

	Environment::SetEnvironmentVariable("EineNeueUmgebungsvariable", nullptr);

	Console::WriteLine("\n\nAlle Umgebungsvariablen:");
	for each (DictionaryEntry u in Environment::GetEnvironmentVariables())
		Console::WriteLine(u.Key + ": " + u.Value);

	Console::ReadLine();
	return 0;
}
