shell = new ActiveXObject("WScript.shell");
shell.run("sketchup.exe");
This snippet works for winzip.exe, iexplore.exe, firefox.exe but not for googleearth, notepad++, sketchup.exe … I gave up trying to find a link for the cannot find specified file error.
Can anyone help a newcomer.
Thanks
Thanks for the reply.
I just found out that this works:
shell = new ActiveXObject("WScript.shell");
shell.run("file:///C:/Program%20Files/Google/Google%20SketchUp%207/SketchUp.exe");
but this doesn’t:
shell = new ActiveXObject("WScript.shell");
shell.run("C:/Program%20Files/Google/Google%20SketchUp%207/SketchUp.exe");
I suppose it is because the hta is a kind of browser but that doesn’t explain why winzip and the others work … or does it?
Possibly those programs are not in the path that is being searched when you try to run programs without saying where to look for them.