Comment: lets find out which IIS we're working with
Get System Setting Internet Information Server 7 into IIS7
Get System Setting Internet Information Server 6 into IIS6
Comment: display the main dialog and retrieve the website's name
Set Variable WEBSITE to 
Display Dialog: main, wait for dialog to return (modal)
Comment: get our Windows directory
Get Common Folder Location System->Windows Directory into WINDOWSDIR
if Variable IIS7 Equals TRUE
  Set IIS 7 Site Property "system.applicationHost/sites[site:name=$WEBSITE$](bindings)[binding:protocol=http]->bindingInformation" to *:$PORT$: in site # 0/
else
  if Variable IIS6 Equals TRUE
    Comment: save the file name of cscript.exe and adsutil.vbs
    Set Variable ADSUTIL to C:\Inetpub\AdminScripts\adsutil.vbs
    Set Variable CSCRIPT to $WINDOWSDIR$system32\cscript.exe
    Comment: get the site index
    Get IIS Index for Site "$WEBSITE$" into WEBSITEINDEX
    Comment: run our batch file and pass the appropriate parameters
    Run Program $SUPPORTDIR$run_adsutil.bat "$CSCRIPT$" "$ADSUTIL$" $WEBSITEINDEX$ $PORT$ (WAIT)
  end
end
 
