Normally the browser will (should) stop anything like this. (otherwise what stops someone writting a webpage that runs something on the client that in not good (like shelling a del *.* in the system 32 dir!)).
I have code that indeed does this but they are really browser exploits and some have been patched....
---
Having said that I did a activex control to do a similar type of thing.
On our intranet the users wanted a set of buttons on a -portal- webpage. These buttons would be marked word/excel/mailbox etc.... clicking the button on the webpage the users wanted the appropriate app to run...
Although I said that this was dodgy, the business overruled me. I created a control that, when given an app name from a javascript, it then located where the app is on the machine (as user have app installed differently etc..). It then shells the app in question, which runs.
I can enclose my workbook if it helps although this doesnt really answer your first question...
If this would be usefull I will enclose, cheers, A.J.P
I am also looking for the ans. and its not a bug which needs to be exploited because, hotmail.com opens up windows messenger on your pc if you have one.
tnk God that sum1 have a similar objective as i am.
jpritchard, cud u share to me the code u did on javascript.
additionally, how would i use an activeX ctrl's method on vbscript? for example, i used kodak's image edit ctrl. i was able to pass on its width,height and other of its basic properties. my problem is that if i tried to show an image through its DISPLAY method, nothing happens.
Im not sure how similar our requirements are..... but am happy to share code..
enclosed is my workbook - also in the zip file is a html file,
dump the content of the zip into a subdir under wwwroot
as shahid said controls are loaded via the object tag
in my app I just passed in a string to the control, from the webpage as the method was called
(
the javascript has the following
<SCRIPT LANGUAGE="JavaScript">
<!--
function RunExcel()
{
uclaunch.Application_Execute("... big fat sting ...")
}
-->
</script>
which executes a sub in my vb
Public Sub Application_Execute(regpathkey As Variant)
)
---
but thats pretty rubbish - I should have made the parameter passed a property instead...
---
in the control
Public Property Let myprop(ByVal tmpstring As String)
...some code.. like myglobalvar = tmpstring
End Property
and in the html..
.
.
<FORM NAME="myform" ID="myform">
<OBJECT ID="myctrl"
CLASSID="CLSID:00000000-0000-0000-0000-000000000000"
CODEBASE="myctrl.CAB#version=12,0,0,0">
</OBJECT>
</FORM>
<script language="JScript">
document.myform.myctrl.myprop = "mybigstringx--x";
document.myform.myctrl.myprop.mainmethod();
</script>
.
.
so something similar....
send me some code U are trying with the kodak control and I will have a go....
cheers, A.J.P
ps - as shahid said - if activex have been disabled on the your pc (or your users pc's), then this all activex controls will fail - (when this happens I encourage my users to understand the zones and add the site in question to the trusted zone (where it is normal to allow actxcontrols to run..) )