Try
Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System));
That will return (normally) C:\
But it depends on how you define the “main” hard drive. This will give you the drive Windows is installed on.
Try
Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System));
That will return (normally) C:\
But it depends on how you define the “main” hard drive. This will give you the drive Windows is installed on.