小编kum*_*ars的帖子

在程序文件下运行 .exe 时出现 System.UnauthorizedAccessException

c:\ProgramFiles通过 WiX 安装程序,我安装了 Windows 应用程序,并使用 .exe 和所需的 dll创建了文件夹。

运行 .exe 时,我得到了System.UnauthorizedAccessException.

如果有任何有用的建议,请告诉我。

请查找以下事件日志以供参考。

Application: xxxxxxx.exe
Framework Version: v1.0.0
Description: The process was terminated due to an unhandled exception.
Exception Info: System.UnauthorizedAccessException
   at System.IO.__Error.WinIOError(Int32, System.String)
   at System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean)
   at System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, System.String, Boolean, Boolean, Boolean)
   at System.IO.StreamWriter.CreateFile(System.String, Boolean, Boolean)
   at System.IO.StreamWriter..ctor(System.String, Boolean, System.Text.Encoding, Int32, Boolean)
   at System.IO.StreamWriter..ctor(System.String, Boolean)
   at System.IO.File.AppendText(System.String)
Run Code Online (Sandbox Code Playgroud)

c# windows windows-installer wix

2
推荐指数
1
解决办法
5979
查看次数

标签 统计

c# ×1

windows ×1

windows-installer ×1

wix ×1