开发者

Installing a new version of an ActiveX control in my web application

I've been tasked to update and install a new version of an old ActiveX control in our Aspx web application (joy!). The actual updating is fairly straightforward, but the installing is giving me headaches. Here is what I tried:

  • In the VB6 editor, get the properties of the ActiveX project, and check off the "autoincrement" checkbox in the "Make" tab.
  • Set the version to 1.0.12
  • Create a new CAB with the Package&Deployment wizard.
  • Copy this CAB to my website.

Then in the Aspx itself, I update the version of the activeX as follows:

Me.Page.Header.Controls.Add(New LiteralControl(String.Format("<div style=DISPLAY:none'><object id='PrtLabel' codebase='{0}开发者_如何学C' classid='CLSID:AB61148E-D4B5-4D4B-8867-9E4CE8229B5E' viewastext></object></div>", "PrtLabel.CAB#version=1,0,0,12")))

After this, I delete the prtlabel.dll and prtlabel.inf files from the "c:\windows\downloaded program files" folder.

Problem is, when I then visit the web page and it asks me to install the activeX, it doesn't actually do it (no error message appears though). When I go back to the "c:\windows\downloaded program files" folder, ONLY the prtlabel.inf file has been copied there, NOT the prtlabel.dll file.

Is there a special procedure to put a new version of an ActiveX control in your website?

Thanks

Sam


Compare contents of original and new cabinet files. Are there files missing?

You migh also want to do a diff on original and new inf files. Did PDW produce reasonable inf?

This might be a case of that your ActiveX control is not marked as safe for scripting before installing on client PC.


Well, as always the devil is in the details. Turned out that in the HTML markup you didn't need to only change the version, but also the classid... which could be found inside the new CAB file.

Me.Page.Header.Controls.Add(New LiteralControl(String.Format("<div style=DISPLAY:none'><object id='PrtLabel' codebase='{0}' classid='**CLSID:AB61148E-D4B5-4D4B-8867-9E4CE8229B5E**' viewastext></object></div>", "PrtLabel.CAB#version=1,0,0,12")))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜