UnauthorizedAccessException: 对路径“C:\Windows\system32\path_history.txt”的访问被拒绝。 StackTrace: 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 在 System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) 在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) 在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) 在 System.IO.File.WriteAllLines(String path, IEnumerable`1 contents) 在 DynamicClass.DirectoryExplorer.OnFormClosing(FormClosingEventArgs e) 在 System.Windows.Forms.Form.RaiseFormClosingOnAppExit() 在 System.Windows.Forms.Application.ExitInternal() 在 System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t) 在 System.Windows.Forms.Control.WndProcException(Exception e) 在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)