Non so se puoi riuscire tramite
Enviroment.GetEnviromentVariable("nomevariabile")