获取系统特殊文件夹路径信息

//获取系统特殊文件夹路径信息
try
{
  this.textBox1.Text=Environment.GetFolderPath(System.Environment.SpecialFolder.System);
  this.textBox2.Text=Environment.GetFolderPath(System.Environment.SpecialFolder.ProgramFiles);
  this.textBox3.Text=Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop);
  this.textBox4.Text=Environment.GetFolderPath(System.Environment.SpecialFolder.Startup);
  this.textBox5.Text=Environment.GetFolderPath(System.Environment.SpecialFolder.StartMenu);
  this.textBox6.Text=Environment.GetFolderPath(System.Environment.SpecialFolder.MyMusic);
}
catch(Exception Err)
{
  MessageBox.Show("获取系统特殊文件夹路径信息发生错误!","信息提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
原文地址:https://www.cnblogs.com/waterair/p/6824385.html