Click to See Complete Forum and Search --> : Help!!How to run .ocx using VBscript?
janice_2k4
06-10-2004, 02:22 AM
Dear gurus and members,
I am a newbie in VBscript. May I know how can I run .ocx using VBScript? Is there any sample codes or suggestions that I can refer? Will running .ocx using VBscript cause any security pop ups such as save/open dialog, activeX? Any suggestions and reference are highly appreciated. Hope to hear some reply soon.
Thanks in advance,
Janice
buntine
06-10-2004, 02:32 AM
In VBScript we use the <OBJECT> element to embed an OCX file into an HTML document.
The following tutorial from MSDN may be helpful: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwsvbs/html/3-dbuttons.asp
Regards,
Andrew Buntine.
janice_2k4
06-10-2004, 09:34 PM
Thanks buntine for your reply and informatin.
I would like to know whether will running .ocx using VBscript cause any security pop ups such as save/open dialog, activeX? Is there any ways to skip those security pop ups? Hope to hear some reply soon.
Thanks in advance,
Janice
buntine
06-10-2004, 09:55 PM
There may be some security dialogs depending on how the user has their PC set up.
Most firewalls will prompt the user for authorisation before any ActiveX controls are executed.
If the user has their security level set to high in IE, they will be prompted before the file is downloaded.
Regards,
Andrew Buntine.
janice_2k4
06-13-2004, 09:52 PM
Hi buntine,
Thanks for your reply. I am wondering whether is there any methods to remove the pop ups without asking the users to set their IE security level lower? I do not plan to purchase the digital signature as the project budget is tight. What if the ocx is stored on the client side? will that cause security pop ups as well, whenever the user clicks on the button to call the ocx? What can I do? I am at total lost now. :confused:
Thanks in advance,
Janice
buntine
06-13-2004, 09:56 PM
Im pretty sure that there is no programmatical way of stopping th security popups on the users browser. Most users are stubborn and will just click 'yes' without even reading the dialog.
You may be able to execute the OCX file from the server using ASP or .NET.
Regards,
Andrew Buntine.
janice_2k4
06-13-2004, 10:07 PM
Thanks buntine,
Regarding your suggestions on executing the OCX file from the server using ASP or .NET, will that eliminate the pop ups? Will storing the ocx on the server site eliminate the security pop ups? Initially I plan to use exe file instead of .ocx. The exe will be stored on the user's computer during the 1st time installation. But according to my research, calling the .exe from client side will also prompt the open/save pop ups. I have to skip this pop up because it will cause user frustration and irritation if there are more than 5 buttons calling the exe/ocx from each page. Any suggestions? Hope to hear some reply soon.
Thanks in advance,
Janice
buntine
06-13-2004, 11:00 PM
Executing the control from the server will stop the client-side prompts, though; not all controls can be run from the server.
There is no way to stop the security popups if the user has their security settings on high.
Though, if each link calss the same file, it should only prompt the user once.
Also, im pretty sure OCX files can only be used in IE, if so this really limits your users.
Regards.
janice_2k4
06-14-2004, 02:51 AM
Thanks for the information and suggestions. By packaging the ocx file into CAB, will the security pop up dialog only appears on the 1st time the user clicks on the button, before user download the file? Will this method eliminate the pop up after user download and install the ocx on the computer? Hope to hear some reply soon
Thanks in advance,
Janice
russell
06-19-2004, 03:24 AM
If the OCX is embedded in the html, the security dialog will appear every time the user loads the page. There is no way to avoid this unless the user clicks "Always trust yourCompany.com."
It isn't possible to run the ocx server side on a client machine either, as an ocx is a user control. Even if it were, you'd still generate a popup.
If the ocx is installed and registered on the client machine, it can be used by trusted applications without any security warnings. The web browser will still popup a warning however.
If you are trying to build a user control for a web browser, what you need is either a plug-in/helper application (compiled code not script) and convince your users to install it, or convince them to always trust your web site and add you to the trusted sites zone. Possible, but tedious on an intranet, nearly impossible over the internet.
russell
russell
06-19-2004, 03:26 AM
Also, Buntine is correct, IE is the only browser that will readily run an ActiveX control.
russell
06-19-2004, 03:29 AM
More thoughts:
Consider using a Java applet, or a Flash animation to achieve the functionality you want from the ocx. The browser won't object AND you'll reach a larger audience. A good JavaScript/DHTML script may do the trick for ya too. Exactly what is your ocx supposed to do anyay...?
janice_2k4
06-20-2004, 09:05 PM
Hi Russel,
Thanks for your information. My ocx is used as a record/playback of user's speech. When the user clicks on a button on my site, it will call this ocx to record his/her speech. It records, playback and save the .wav file onto user's pc for further usage. Any suggestions and ideas are highly appreciated.
Thanks in advance,
Janice
russell
06-21-2004, 03:16 PM
Sounds to me like you want to build a plugin. Here are some links that might help. Remember that creating a plugin or any trusted application will require convincing the user that they are better off with it than they are without it, and that you are trustworthy enough to download your code.
Microsoft (http://support.microsoft.com/default.aspx?scid=kb;en-us;306790)
Netscape 4 (http://developer.netscape.com/docs/manuals/communicator/plugin/basic.htm)
Netscpae 7 (http://devedge.netscape.com/library/manuals/2002/plugin/1.0/)
Sun, Java alternative (http://servlet.java.sun.com/javaone/javaone2000/pdfs/TS-1464.pdf)
janice_2k4
06-21-2004, 08:53 PM
Hi Russell,
You are right, I am trying to biuld a plugin. Thanks for the useful links and suggestions. I will look into them. Have a pleasant day.
Thanks,
Janice
vvenkatesh
03-01-2007, 07:30 AM
Hi,
I created an ocx file uploaded to server and registered using regsvr32 and embed that in HTML page. It is working in server side but when I try to browse that HTML page from local machine it shows "unknown publisher" error and problem is in digital signature and certificate. We are not able to purchase the code sign certificate is there is any other way to create certificate by our own to access.
Error:::
Windows has blocked this software because it can’t verify the publisher
Name: MobileChatClient.ocx
Publisher: Unknown publisher
:confused: