自动安装 Comdlg32.ocx?
我想要将包含 comdlg32.ocx 组件的表单的 Excel 电子表格分发到网络共享。
Windows 7 用户可能不会安装或注册此组件。有没有办法在 Windows 7 中自动检查并安装该组件?
I'm wanting to distribute an Excel spreadsheet with a form including a comdlg32.ocx component to a networked share.
Windows 7 users likely won't have this component installed or registered. Is there a way to automatically check and then possibly install this component in Windows 7?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我曾经有一些代码,它做了一些类似的事情,
如果 regsvr 调用失败,显然你会希望避免进入无限循环。另外,我不建议在网络共享上注册 dll;下次运行宏时它可能不可用。首先尝试将其复制到本地驱动器。
还有一件事需要考虑:您不应该真正复制单个系统 DLL,因为它们是成组发布的,这样做可能会导致版本控制问题。但有时,我也发现冒险并继续前进会更容易。
I once had some code which did something along the lines of
Obviously you'll want to avoid getting into an endless loop if the regsvr call fails. Plus, I wouldn't recommend registering the dll on the network share; it might not be available the next time the macro runs. Try to copy it to the local drive first.
One more thing to consider: You shouldn't really be copying a single system DLL, since they're released in sets and doing so can cause versioning issues. Sometimes, though, I've also found it easier just to take the risk and move on.