使用msi安装程序安装的ActiveX控件

时间:2021-04-16 22:45:36

I created ActiveX control and it's .msi installer in a way described in this tutorial http://haseebakhtar.wordpress.com/2011/05/31/creating-an-activex-control-in-net-using-c/. Then I installed that ActiveX control using this installer and tried to execute it in IE9. Installation went fine. And after that I got an excellent work of my component in a web browser.

我以本教程中描述的方式创建了ActiveX控件及其.msi安装程序http://haseebakhtar.wordpress.com/2011/05/31/creating-an-activex-control-in-net-using-c/。然后我使用此安装程序安装了该ActiveX控件,并尝试在IE9中执行它。安装顺利。之后,我在网络浏览器中完成了我的组件的出色工作。

Next time I ran the installer once more to uninstall the component. It seemed that everything was fine since I didn't have any errors while uninstalling the component and the folder of installation was removed from the disc. But then I could see that the activeX control continue to execute anytime I reload the page in IE. At first I thought that the IE had buffered it and then I decided to clear all browsing history. But it didn't help. I also restarted IE and my web server but that didn't give any changes. ActiveX control is still working.

下次我再次运行安装程序以卸载组件。似乎一切都很好,因为我卸载组件时没有任何错误,并且从光盘中删除了安装文件夹。但随后我可以看到,当我在IE中重新加载页面时,activeX控件会继续执行。起初我以为IE已经缓冲了它,然后我决定清除所有浏览历史记录。但它没有帮助。我也重新启动了IE和我的Web服务器,但没有给出任何更改。 ActiveX控件仍然有效。

My questions:

1) How can I uninstall it in proper way?

1)如何以正确的方式卸载它?

2) Should I uninstall and install my activeX component anytime I want to see any changes I did? Is there any easier way to see results of my work in IE?

2)我是否应该在想要看到任何更改时卸载并安装我的activeX组件?有没有更简单的方法来查看我在IE中的工作结果?

1 个解决方案

#1


0  

After your have uninstalled your control, search the file system for its DLL and the registry for its GUID. If the GUID is still registered, that'd mean the uninstaller did not do its work properly. The DLL still could be there, if you had your web page open during the uninstall pass (as the web page would keep the DLL loaded). It should be gone upon reboot, though; if it is not, that would be again a problem of the MSI script.

卸载控件后,在文件系统中搜索其DLL和注册表以获取其GUID。如果仍然注册了GUID,那么这意味着卸载程序无法正常工作。如果你在卸载过程中打开了你的网页(因为网页会加载DLL),DLL仍然可以存在。不过,它应该在重启时消失;如果不是,那将再次成为MSI脚本的问题。

Note, you could have your control installed automatically by IE without MSI, provided the control only uses HKEY_CURRENT_USER hive for its registration, here is how. Although, you would need to digitally sign your control package for this to happen, which is always a good idea anyway.

注意,如果控件仅使用HKEY_CURRENT_USER配置单元进行注册,您可以在没有MSI的情况下通过IE自动安装控件,方法如下。虽然,你需要对你的控制包进行数字签名才能实现这一点,无论如何这总是一个好主意。

#1


0  

After your have uninstalled your control, search the file system for its DLL and the registry for its GUID. If the GUID is still registered, that'd mean the uninstaller did not do its work properly. The DLL still could be there, if you had your web page open during the uninstall pass (as the web page would keep the DLL loaded). It should be gone upon reboot, though; if it is not, that would be again a problem of the MSI script.

卸载控件后,在文件系统中搜索其DLL和注册表以获取其GUID。如果仍然注册了GUID,那么这意味着卸载程序无法正常工作。如果你在卸载过程中打开了你的网页(因为网页会加载DLL),DLL仍然可以存在。不过,它应该在重启时消失;如果不是,那将再次成为MSI脚本的问题。

Note, you could have your control installed automatically by IE without MSI, provided the control only uses HKEY_CURRENT_USER hive for its registration, here is how. Although, you would need to digitally sign your control package for this to happen, which is always a good idea anyway.

注意,如果控件仅使用HKEY_CURRENT_USER配置单元进行注册,您可以在没有MSI的情况下通过IE自动安装控件,方法如下。虽然,你需要对你的控制包进行数字签名才能实现这一点,无论如何这总是一个好主意。