Tag: #windows wix

在WIX中强制杀死Windows服务

我有Windows服务,将作为wix安装的一部分安装。 问题是,当前服务正在生产中,并且由于服务OnStop方法中的一些编写不良的代码而没有响应停止。 因此,下次用户尝试安装升级版本时,安装将失败,因为当wix尝试停止服务时,服务永远不会停止。 有没有什么方法可以让我知道如果wix花了太多时间来卸载,如果我收到通知我可以杀死进程? 另外,有什么方法可以根据产品版本杀死进程吗? 谢谢

从管理员配置文件创建当前用户配置文件中的文件夹和文件

我们的客户端仅允许以管理员身份登录时安装应用程序。 必须为机器的当前用户安装需要安装的应用程序。 应用程序安装正常,当我需要在用户的appdata /用户配置文件文件夹中删除配置文件时,我的问题就出现了。 由于这是他们想要的地方,目前配置在安装时被删除在管理员配置文件中。 我如何通过这个,有没有办法让我检查安装,如果有其他配置文件,也许写给他们,但这感觉很脏。

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

通过WiX安装程序,我安装了我的Windows应用程序,并在c:\ProgramFiles使用.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) […]