I posted my original message from work. I have VB6 on order (because I like it), but it's a big bureaucratic agency and stuff doesn't happen very fast. At home I wrote a simple OCX with one string function output. In the HTML I put the following:
<HTML>
<HEAD>
<OBJECT id=UN codeBase=WebUsername.ocx classid=clsid:4BAA63AE-9C9C-4BC6-8EB7-B99060599519 VIEWASTEXT>
</OBJECT>
<SCRIPT language=vbscript id=clientEventHandlersVBS>
<!--
Sub window_onload
document.write(UN.username)
End Sub
-->
</SCRIPT>
</HEAD>
<BODY >
</BODY></HTML>
I copied this from another project and got the clsid from the registry after compiling the control. After compiling I unregistered the control, then placed the OCX file on the desktop next to my test HTML file. I ran the test HTML file and it worked. Also, when the page rendered, the OCX was copied to Windows\Downloaded_Program_Files, as if downloaded from the internet.
I did get the same security warning I got when I did the WShell example. I want IE to give me the information bar at the top and give me the opportunity to download the ActiveX control.
So I unregistered the control and deleted it, then I uploaded the test HTML and the OCX file to my personal web page. When I tried to run the test HTML there, I got the information bar at the top, but then I got a message saying Microsoft could not verify the publisher, and it was blocked. If I saw the information bar, and I allowed the ActiveX control to be installed, I thought it was supposed to go ahead and do that. What's the deal?
When I put this in production I don't mind the info bar being there, but I do need the ActiveX to install. How can I get it to do that? Thanks