Re: Launch chm file on WS within HTML

From: Ray Hinse (rhinse_at_comcast.net)
Date: 03/21/04


Date: Sun, 21 Mar 2004 04:42:41 GMT

Thank you for that 'more than I expected' explanation.

Since I am running on a Windows 2000 system, the explanation sort of begs the
question 'why do I need the double quotes within quotes?' The command line cd
command certainly works without resorting to the 8.3 filenames but maybe that's
the only place where it works. Nevertheless, your solution certainly works
for VBS.

Now, if you could proffer a solution for JScript, that would work equally well
I could consider my research complete. The """ solution will not work in JScript
since anytime it encounters a "", it reads as an empty string. The normal solution
to this in JScript is to use alternating single and double quotes (" ' " " ' ").

oShell.run " ' "c:\WSH Script\TechNet Script Center\scriptcenter.chm" ' "; seems to
work but on page load I get an error: expected ; at the point oShell.run ^" ' ".

Thank you again for your excellent input!
 And Cheers to you!

"Chris ( Val )" <chrisval@bigpond.com.au> wrote in message
news:c3j37i$285cqc$1@ID-110726.news.uni-berlin.de...
> "Ray Hinse" <rhinse@comcast.net> wrote in message
> news:ZA37c.50907$KO3.173145@attbi_s02...
> | OOPS! I spoke too soon. I misread your recommendation
> | and only surrounded the file path with two double quotes.
> | Three double quotes (""") works well. Maybe you could explain
> | a little more thoroughly why I need three?
>
> Hi Ray.
>
> It all has to do with the way windows parses the
> command line arguments with spaces, and long ones
> at that. This is where the DOS 8.3 naming convention
> comes into play.
>
> For example, if a path was longer than 8 characters
> and had spaces in it, it would get resolved to something
> a lot shorter.
>
> For example, if you run the 'DIR' command under Windows
> 95, Windows 98 or Windows ME MS-DOS, you might see something
> like this:
>
> progra~1
>
> This is supposed to be 'Program Files', and if I wanted to
> change to that directory, I would have to type:
>
> C:\> cd progra~1
>
> Or
>
> C:\> cd "program files"
>
> When you use three double quotes, as in:
>
> """c:\WSH Script\TechNet Script Center\scriptcenter.chm"""
>
> The string is actually resolved to look like this:
>
> "c:\WSH Script\TechNet Script Center\scriptcenter.chm"
>
> Preceding one double quote with another, is said to escape
> the one following it.
>
> Surrounding a command argument like this with double quotes,
> means to treat it as one long command argument, rather than
> split it up into individual arguments where ever it sees white
> space, or long file names.
>
> Windows 2000 and XP are not affected by this naming convention
> at the command prompt, and you can do:
>
> C:\> cd Program files
>
> and it will work fine, however, I don't think it works for all
> commands, so it is best to surround your command line argument
> with double quotes.
>
> The best way to see exactly what I mean by escaping characters,
> is (if you have visual basic installed), type the following
> into the editor in some suitable sub, etc...
>
> Debug.Print """c:\WSH Script\TechNet Script Center\scriptcenter.chm"""
>
> The output in the Debug window should now look like this:
>
> "c:\WSH Script\TechNet Script Center\scriptcenter.chm"
>
> Hope this helps.
>
> Cheers.
> Chris Val
>
>



Relevant Pages

  • Re: PowerPointViewer
    ... download site that an Office 2007 PowerPointViewer was available. ... Now when I try to open a .pps, I get a series of windows identifying files that PPV can't find. ... And remember I say 'type' meaning any way to get windows to run / execute the del command. ... SO putting it in quotes means you want the entire file name to be whatever is in the variable %1. ...
    (microsoft.public.windowsxp.general)
  • Re: PowerPointViewer
    ... download site that an Office 2007 PowerPointViewer was available. ... When windows started allowing users to put spaces in the name things got ... When you type a command like Del Myfile.txt it works great. ... SO putting it in quotes means you want the entire file name to ...
    (microsoft.public.windowsxp.general)
  • Re: Launch chm file on WS within HTML
    ... | and only surrounded the file path with two double quotes. ... if you run the 'DIR' command under Windows ... Surrounding a command argument like this with double quotes, ...
    (microsoft.public.scripting.wsh)
  • Re: [SLE] bash Script Using Filenames with Embedded Spaces
    ... If it is a literal space for the ls command, ... wonder what effect the quotes will have placed in different places ... Antonio Vivaldi-Gloria Dixit Dominus Magnificat Choir of Kings College ...
    (SuSE)
  • Re: [SLE] bash Script Using Filenames with Embedded Spaces
    ... If it is a literal space for the ls command, ... wonder what effect the quotes will have placed in different places ... Antonio Vivaldi-Gloria Dixit Dominus Magnificat Choir of Kings College ...
    (SuSE)

Loading