You can find out the system directory of the current OS by the property
Environment.SystemDirectory
This will give you someting like "E:\Windows\System32".
or read an environemnt variable called "SystemRoot" which will give you
"E:\Windows"
if you are interested only in the drive(partition) in which the current
os is installed Then read an environment variable called SystemDrive
which will give you "E:"
hope this helps.
regards,
Abhishek.
[quoted text, click to view] Arr S wrote:
> Hi,
> I am developing a dll in C#. This has to find the root directory(partition) in which the currently running Operating System is installed. Is there a way to do it and how?
> Thanks in advance,