Just have a closer Look at the Class Environment.
The Environment Variable is SystemRoot, so you can use
Environment.GetEnvironmentVariable("SystemRoot")
Yes I think so, because it is commonly used by microsoft. (On Win NT
based systems, but the .NET Framework isn't available for Win 9x/ME, so
that shouldn't matter - or am I wrong?)
Is it possible for the current user not to have
EnvironmentPermission with Read access?
Hmm ... normaly all users should have these rights. In the moment, I
cannot emagine such a constelation, but maybe it is possible with
policies to regret users that right. But of course: There variables
could be changed. But I see no reason, why somebody changes these
variables.
With kind regards,
Konrad
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.