I need to add an isapiCgiRestriction in IIS 7. You currently only allow adding ISAPI Filters. A similar feature to add an isapiCgiRestriction is needed. There is a command line interface to do it.
Bat file to add and remove one follows:
rem To add a isapiCgiRestriction to IIS 7
cd C:\Windows\System32\inetsrv
appcmd set config /section:isapiCgiRestriction /+"[path='C:\Perl\bin\perl.exe',description='Team App Demo Bouncer',allowed='True']"
rem To remove a isapiCgiRestriction to IIS 7
cd C:\Windows\System32\inetsrv
appcmd set config /section:isapiCgiRestriction /-"[path='C:\Perl\bin\perl.exe',description='Team App Demo Bouncer']"
pause
rem Where
rem C:\Perl\bin\perl.exe is the executable
rem Team App Demo Bouncer is the description
rem
rem Allowed can be either true or false but true makes sense if you are installing
rem The + adds it and a - would delete it