维斯塔& C# - 拖放 跌落问题(与海拔无关)
有问题的应用程序是.Net 2.0 Framework WinForms。 它应该适用于大量用户群(从 CD 安装)。 使用 InnoSetup 完成安装。
在两台机器上,应用程序不接受拖放 掉落(D&D 的应用程序和源具有相同的海拔高度)。
通过添加读取和 应用程序快捷方式的 INTERACTIVE SID 的读取和执行权限,这个问题似乎已经解决。
问题:添加这些权限和D&D有何关系以及如何在安装过程中检查/设置这些权限?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您在这里有两个问题:
这一点我完全不确定。 我们在 WinForm 应用程序中使用 D&D 与 shell 和 Outlook 之间进行交互,在 Vista 中没有任何问题。 我什至不确定您建议的 ACL 更改是否一定能解决您遇到的任何问题。
执行此操作的简单方法是 创建一个 .Net安装类并添加以下代码:
You have two questions here:
This I'm totally unsure about. We use D&D in our WinForm app to/from the shell and Outlook without any issues in Vista. I'm not even certain the ACL change you suggest will be certain to fix whatever issue your having.
The easy way to do this is to create a .Net install class and add the following code:
只是一个猜测,但是 [STAThread] 属性是否存在于应用程序的 Main() 方法中? 没有它,拖放根本不起作用。 (尽管这无法解释随着 INTERACTIVE SID 上的权利变化而发生的行为变化)。
Just a shot in the dark, but is the [STAThread] attribute present on your application's Main() method? Without it, drag and drop won't work at all. (Although this fails to explain the change in behavior with the change of rights on INTERACTIVE SID).
您应该在 Visual Studio 环境之外直接运行项目的 exe 文件。 我正在 Windows Vista 平台上工作。
You should run the exe file for the project directly and outside of the environment of Visual Studio. I'm working on a Windows Vista platform.