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}' 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
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.