Attention !

Ce site n'est plus maintenu. Retrouvez l'article sur

Vous allez être redirigé dans 5 secondes...

Vous êtes ici : Accueil > Blog technique > PERL / Appcmd :

PERL / Appcmd : Add a mapping element that contains spaces and quotes.

 When you try to add a module mapping for perl, it is supposed to be configured like this in IIS :

Request Path : *.pl

Executable : C:\Perl\bin\perl.exe "%s" %s

This declaration looks like this in IIS config files (web.config or machine.config) :


<add name="Perl" path="*.pl" verb="GET,HEAD,POST" modules="CgiModule" scriptProcessor="E:\Perl64\Perl64\bin\perl.exe &quot;%s&quot; %s" />


The double-quotes that surrounds %s are encoded with XML encoding.

But when you use appcmd command to declare this module mapping, it is a bit more tricky, because you cannot use the special character &. Furthermore, the presence of spaces into the "scriptProcessor" attribute force you to surround the whole expression with double-quotes...

So, this is the appcmd command :

appcmd.exe set config /section:handlers /"+[name='Perl',paverb='GET,HEAD,POST',modules='CgiModule',scriptProcessor='E:\Perl64\Perl64\bin\perl.exe %u0022%s%u0022 %s']"