Quote:
Originally Posted by SaswatPadhi View Post
That problem is faced by many, I had also faced in VBScript !!

Well, the solution is to wrap the file-name with an extra pair of quotes.
The modified code looks like this :

Code: java
function runXZNNespritsPMz()</p>
<p>{</p>
<p> FileName="\"E:\\XZNNesprits\\ZZ XZNNesprits PMz.session\"";</p>
<p> WSH=new ActiveXObject("WScript.Shell");</p>
<p> WSH.run(FileName);</p>
<p>}



I think this will work, 'cuz this worked for me in VBScript

Thanks so much SaswatPadhi. You are the first one who ever answered me a question on this forum (my first ever too!). OK I calm down.

I tried your syntax as a var value and it is perfect in js except that there must not be present those two backslashes in between the double double quotes. So that would be:

var whichever_name = '"E:\\XZNNesprits\\ZZ XZNNesprits PMz.session"'

In fact, I started to relocate many of the files and folders I needed to call through js (renaming them without any empty spaces) and found that when you look at the Properties, in WinXP, of a shortcut, it give you the target path embedded by double quotes, and, if no empty spaces in name of file nor of the whole path, it does not embed it in double quotes.

Thanks again to reply me SaswatPadhi.