Forum Moderators: open
I have a link to (for example) WordPad in my html document, when I click on this link I get the MS dialogue box appearing with the options 'Open' 'Save' 'Cancel' 'More Info'.
Is there a way so that I can open the application automatically without this dialogue box appearing as the application has already been installed on the PC (and all users PC's)
Currently the anchor tag looks like this :<a href="file:C:\Program Files\Windows NT\Accessories\wordpad.exe">Open WordPad</a>
Any help on the matter is appreciated...
Thanks in advance,
-gs
The reason for this is that it is extremely dangerous for the user to directly execute a file on their computer from an untrusted zone. I.E. The internet.
If you are trying to do this for your public website then I suggest you think again.
If though, you are trying to do this for a company Intranet or local LAN then stickymail me with your goals and reasons for wanting to do this and I "may" help you.
Jason
Many thanks for your prompt response.
I have managed to do it with the use of JavaScript using the ActiveX control as follows:
function executeWinWord(){
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe";
oShell.ShellExecute(commandtoRun);
}
And yeah it for use in the company Intranet.
Once again thanks,
-gs