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

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

am 17.01.2008 01:10:03 von AdamMarshall

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"

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

am 17.01.2008 02:20:01 von AdamMarshall

"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

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

am 17.01.2008 02:30:04 von David Wang

On Jan 16, 5:20=A0pm, Adam Marshall
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
//