[thelist] using activeX to load .exe files from a web page | resolved | thanx...

Kevin Raleigh krr at ix.netcom.com
Tue Jul 10 14:12:18 CDT 2001


I was able to resolve the activeXtest.zip problem
with some help :-)

The Code:

function openFile(name) {
 try {
   if (document.all){
   pth=this.location.href.substring(0,this.location.href.lastIndexOf("/")+1)
+ name
   var obj = new ActiveXObject("WScript.Shell");
   obj.Run(pth,1);
   }
 }

 catch(e) {
 window.location.reload();
 }
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I was told that the reason the script failed was because it needed the full
path of the object.
The initial test case that were run used objects that had already been
registered by windows.

Thank You
Kevin





More information about the thelist mailing list