Launch an Application from Event in HTMLVIEW
-
I need a way to launch an external application (like notepad.exe) from a click within the page displayed in the CHTMLVIEW of an MFC application. I accomplished this with wscript.shell.run in javascript but I get an annoying prompt every time with a yes or no for whether i want to allow the active X content to run. ALL the internet explorer script and active X stuff has been set to "Enable" and i still get this. Is there some better way to launch an application based on a link in the webpage that won't prompt the user each time?
-
I need a way to launch an external application (like notepad.exe) from a click within the page displayed in the CHTMLVIEW of an MFC application. I accomplished this with wscript.shell.run in javascript but I get an annoying prompt every time with a yes or no for whether i want to allow the active X content to run. ALL the internet explorer script and active X stuff has been set to "Enable" and i still get this. Is there some better way to launch an application based on a link in the webpage that won't prompt the user each time?
Well I know that you can launch an exe with Internet Explorer by assigning a protocol to the exe Insert the following into the registry:
[HKEY_CLASSES_ROOT\notepad]
@="URL:notepad Protocol"
"URL Protocol"=""[HKEY_CLASSES_ROOT\notepad\shell]
[HKEY_CLASSES_ROOT\notepad\shell\open]
[HKEY_CLASSES_ROOT\notepad\shell\open\command]
@="\"c:\\notepad.exe\" \"%1\""Your link will then need to be notepad:parameters where parameters are the parameters you wish to pass. Change notepad above to whatever name you wish for your protocol.
-
I need a way to launch an external application (like notepad.exe) from a click within the page displayed in the CHTMLVIEW of an MFC application. I accomplished this with wscript.shell.run in javascript but I get an annoying prompt every time with a yes or no for whether i want to allow the active X content to run. ALL the internet explorer script and active X stuff has been set to "Enable" and i still get this. Is there some better way to launch an application based on a link in the webpage that won't prompt the user each time?
i suggest you take a look at many articles here in CP by people who mamanged to intercept javascrip or url click inside HTML doc displayed through CHTMLView. Thus you will be able to code whatsoever application or action you may want to execute via the C++ code. Good luck.
Our Philosophy, Mohammed Baqir Al Sadr