Finding Windows path?

  • Thread starter Thread starter VMI
  • Start date Start date
V

VMI

How can I find the Windows path? I tried using Environment.SystemDirectory
but it returns c:\windows\system32. Is there something that only returns
"C:\Windows"?
What I'm trying to do is copy a font to the Windows\Fonts directory so that
my application can use it.
Thanks.
 
string winDir = Environment.GetEnvironmentVariable("windir");
string targetPath = winDir + @"\Fonts";
System.IO.File.Copy ("[source]", targetPath);

NuTcAsE
 
Back
Top