Hi all,
I would like to open any program on a computer, using JScript.
I have this little piece of code here...
Example:Code:function run(url) { var File = url; var WSH = new ActiveXObject("WScript.Shell"); WSH.run(File, 1, true); }
Opening a file like this works perfect.HTML Code:<a href="#" name="cmd.exe" title="Cmd" onClick="run(this.name); return false;">open cmd</a>
Now another example...
HTML Code:<a href="#" name="C:\Program Files\Internet Explorer\iexplore.exe" title="Internet Explorer" onClick="run(this.name); return false;">Internet Explorer</a>
This DOESN'T work... I think it's because of the spaces in the url... What should i do to make this work?
Ruben


Reply With Quote

Bookmarks