Re: Launch chm file on WS within HTML
From: Ray Hinse (rhinse_at_comcast.net)
Date: 03/21/04
- Next message: Yuri Weinstein \(HotMail\): "Automatically login a user from 'at'"
- Previous message: Chris \( Val \): "Re: Launch chm file on WS within HTML"
- In reply to: Chris \( Val \): "Re: Launch chm file on WS within HTML"
- Next in thread: Chris \( Val \): "Re: Launch chm file on WS within HTML"
- Reply: Chris \( Val \): "Re: Launch chm file on WS within HTML"
- Reply: Al Dunbar [MS-MVP]: "Re: Launch chm file on WS within HTML"
- Messages sorted by: [ date ] [ thread ]
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
>
>
- Next message: Yuri Weinstein \(HotMail\): "Automatically login a user from 'at'"
- Previous message: Chris \( Val \): "Re: Launch chm file on WS within HTML"
- In reply to: Chris \( Val \): "Re: Launch chm file on WS within HTML"
- Next in thread: Chris \( Val \): "Re: Launch chm file on WS within HTML"
- Reply: Chris \( Val \): "Re: Launch chm file on WS within HTML"
- Reply: Al Dunbar [MS-MVP]: "Re: Launch chm file on WS within HTML"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|