卸载时删除加载项 UI
我有一个 Outlook 加载项,仅在 Outlook 首次启动时运行,此时它会创建一个工具箱并将其添加到 Outlook 的命令栏。我使用这种方法而不是在每次启动时创建临时 UI,因为我希望用户关于控件的决定能够持久;如果用户禁用该控件或移动它,它应该保持移动状态。
但是,卸载应用程序时,即使 dll 已取消注册并删除,UI 仍会保留。目前,我解决此问题的唯一想法是让加载项 dll(或单独的 dll)在卸载后保留在后面,在卸载模式下再次触发,并在 Outlook 下次启动时删除工具栏。
这种方法有一些问题:
- 我不确定,除了取消注册和注册 dll 之外,如何强制我制作的 dll 在 Outlook 下次启动时再次运行。
- 我不确定我对某种方法的想法是否是个好主意。
- 这整件事让我觉得很老套。
卸载后删除此类 UI 的最佳方法是什么?
I have an outlook add-in which runs only on the first startup of Outlook, at which point it creates a toolbox and adds it to Outlook's command bar. I used this approach rather than creating a temporary UI on each startup because I want the user's decisions about the control to be persistent; if the user disables the control or moves it, it should stay moved.
However, when uninstalling the application, the UI stays behind, even though the dll is unregistered and deleted. CUrrently, the only idea I have for fixing this issue is for the add-in dll (or a separate dll) to, after uninstall, remain behind, be triggered one more in uninstall mode, and remove the toolbar the next time Outlook starts up.
There are a few issues with this approach:
- I am not sure, short of unregistering and registering the dll, how to force the dll I made to run again the next time outlook starts.
- I am not sure if my thoughts on an approach are even a good idea.
- This whole thing strikes me as hacky.
What would be the best way to remove such a UI after an uninstall?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我会发布这个问题的真正答案,这是每个人都说要做的,但不是我想听到的。正确的解决方案是使其成为临时工具栏,然后自己手动保存/加载定位数据(例如 这个)。
Well, I'll post the real answer to this, which is what everyone says to do, but is not what I wanted to hear. The correct solution is to just make it a temporary toolbar and save/load the positioning data myself by hand (e.g. something like this).