Using script to create a Web Extension containing quotes (")

I need to create a web extension that contains quotes (") as part of an
installation script. I am using the IISExt.vbs script and can successfully
add the extension with everything correct EXCEPT the quote characters.

C:\Perl\Bin\perl.exe "%s" %s

No matter what I've tried it doesn't seem to work.
^" "" """ "
All of these fail.

Has anyone had success in doing this?

IISExt /addfile "C:\Perl\bin\perl.exe "%s" %s" 1 "Perl CGI" 1 "Perl CGI"
AdamMarshall [ Do, 17 Januar 2008 01:10 ] [ ID #1910654 ]

RE: Using script to create a Web Extension containing quotes (")

"Adam Marshall" wrote:

> I need to create a web extension that contains quotes (") as part of an
> installation script. I am using the IISExt.vbs script and can successfully
> add the extension with everything correct EXCEPT the quote characters.
>
> C:\Perl\Bin\perl.exe "%s" %s
>
> No matter what I've tried it doesn't seem to work.
> ^" "" """ "
> All of these fail.
>
> Has anyone had success in doing this?
>
> IISExt /addfile "C:\Perl\bin\perl.exe "%s" %s" 1 "Perl CGI" 1 "Perl CGI"
>
>

Update:
OK, I have a way around it now; still not ideal but it works:

Created a new .vbs script IISExtAddPerl.vbs

Option explicit
dim WebServiceObj

Set WebServiceObj = GetObject("IIS://localhost/W3SVC")
WebServiceObj.AddExtensionFile "C:\Perl\bin\perl.exe ""%s"" %s", True, "Perl
CGI", True, "Perl CGI"
WebServiceObj.SetInfo
AdamMarshall [ Do, 17 Januar 2008 02:20 ] [ ID #1910657 ]

Re: Using script to create a Web Extension containing quotes (")

On Jan 16, 5:20=A0pm, Adam Marshall
<AdamMarsh... [at] discussions.microsoft.com> wrote:
> "Adam Marshall" wrote:
> > I need to create a web extension that contains quotes (") as part of an
> > installation script. I am using the IISExt.vbs script and can successful=
ly
> > add the extension with everything correct EXCEPT the quote characters.
>
> > C:\Perl\Bin\perl.exe "%s" %s
>
> > No matter what I've tried it doesn't seem to work.
> > ^" =A0 "" =A0 """ "
> > All of these fail.
>
> > Has anyone had success in doing this?
>
> > IISExt /addfile "C:\Perl\bin\perl.exe "%s" %s" 1 "Perl CGI" 1 "Perl CGI"=

>
> Update:
> OK, I have a way around it now; still not ideal but it works:
>
> Created a new .vbs script IISExtAddPerl.vbs
>
> Option explicit
> dim WebServiceObj
>
> Set WebServiceObj =3D GetObject("IIS://localhost/W3SVC")
> WebServiceObj.AddExtensionFile "C:\Perl\bin\perl.exe ""%s"" %s", True, "Pe=
rl
> CGI", True, "Perl CGI"
> WebServiceObj.SetInfo- Hide quoted text -
>
> - Show quoted text -


The reason it does not work from the commandline is because of two
things:
1. command shell parses parameters based on "
2. Windows Script Host collapses multiple " into a single "

Thus, none of what you tried will work. You will either have to write
explicit code (which you've done), or use a different escaping for
" (I use `` for this purpose).


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
David Wang [ Do, 17 Januar 2008 02:30 ] [ ID #1910659 ]
Webserver » microsoft.public.inetserver.iis » Using script to create a Web Extension containing quotes (")

Vorheriges Thema: ASP.NET ISAPI extension (aspnet_isapi.dll)
Nächstes Thema: Over 66 seconds to fetch a simple css file on IIS 6 - follow up