quote:
Originally posted by hmaster
quote:
Originally posted by tobias
Now does anyone have any ideas as to my first problem?
The problem is the spaces in the path. I don't know what to replace it with though. I've tried %20 but that didn't work.
you do what you normally would with a path containing spaces, put quotes around it. Which means you can either do this:
code:
new ActiveXObject("WScript.Shell").Run("\"C:\\Path Containing Spaces\"");
or to simplify things, use single quotes instead of double quotes for the string:
code:
new ActiveXObject("WScript.Shell").Run('"C:\\Path Containing Spaces"');
edit: added red highlighting to show double quotes on second example.
edit 2: updated matty's function to support paths containing spaces:
code:
function _start_app(_path){
new ActiveXObject('WScript.Shell').run('"' + _path + '"');
}