Results 1 to 4 of 4

Thread: Installing ISAPI filters to the IIS

  1. #1
    nikfjell Guest

    Installing ISAPI filters to the IIS

    Hi
    How do you install ISAPI filers to IIS with Install Shield?
    Best regards
    /Niklas

  2. #2
    Cortneyw Guest

    Re: Installing ISAPI filters to the IIS

    I accomplished this through script and a accompanying DLL (IsGetObj.dll).

    Newbie to InstallShield (only a couple of weeks) and I recently had to overcome this task.... so I feel your pain.

    Refer to "sreeramg"'s post in this previous ISC thread concerning create WebVDirs:
    http://community.installshield.com/s...l&pagenumber=1

    Get (http://installsite.org/files/GetObject.zip) and setup up the DLL as suggested in sreeramg's post...

    The function I wrote to create the ISAPI filter is below. Ignore REPORTERROR (my way of display/flat-file logging errors). and "pISAPI" is just a pointer to a typedef of strings for the ISAPI properties that were set before a call to this function.
    **********************************************
    function CreateISAPIFilter(pISAPI)
    OBJECT myObj, objISAPI;
    begin
    if (UseDLL(SUPPORTDIR ^ "IsGetObj.dll") < 0 ) then
    REPORTERROR( "Could not load DLL: " + SUPPORTDIR ^ "IsGetObj.dll", SEVERE);
    endif;
    if (MyGetObject("IIS://localhost/W3SVC/Filters", "", myObj) = FALSE) then
    REPORTERROR ("Failure creating IIS object", SEVERE);
    endif;

    if (MyGetObject("IIS://localhost/W3SVC/Filters/" ^ pISAPI->sName, "", objISAPI) = FALSE) then
    try
    set objISAPI = myObj.Create("IIsFilter", pISAPI->sName);
    catch
    REPORTERROR ("Failure creating IIS ISAPI Filter: " + pISAPI->sName, SEVERE);
    endcatch;
    endif;
    try
    objISAPI.FilterPath = pISAPI->sPath;
    if !(myObj.FilterLoadOrder % pISAPI->sName) then
    myObj.FilterLoadOrder = myObj.FilterLoadOrder + "," + pISAPI->sName;
    endif;
    objISAPI.SetInfo();
    myObj.SetInfo();
    catch
    REPORTERROR("Unable to set ISAPI Filter properties for: " + pISAPI->sName, SEVERE);
    endcatch;
    UnUseDLL(SUPPORTDIR ^ "IsGetObj.dll");
    end;
    **********************************************

    Good luck!

    Originally posted by nikfjell
    Hi
    How do you install ISAPI filers to IIS with Install Shield?
    Best regards
    /Niklas

  3. #3
    nikfjell Guest
    Thank you.
    /Niklas

  4. #4
    palani Guest

    ISAPI filter through IsGetObj.dll

    Hi all

    I am new to the InstallShield. I am trying a create a ISAPI filter ( trying to add a dll file in to the IIS ) automatically through IsGetObj.dll function , which was already posted in the group. I have some with the function and please help me on this.

    I have already crteated the Virtual directory in IIS through IsGetObj.dll object. I am trying add a dll file to the ISAPI filter though this dll. Can any one pls send me the piece of code that used to create the ISAPI filter through IsGetObj.dll object.

    I have tried this function that used to create the ISAPI filter , which is posted by Cortneyw on 02-03-2003 08:23 AM. But I am getting a error. Like this.

    typedef pointer type required.

    In this function , CreateISAPIFilter(pISAPI) what is that pISAPI?
    where should I call this function in my code? and What should I declare before calling this function

    In the previous post it is written like this
    ++++++++++++++++++++++
    The function I wrote to create the ISAPI filter is below. Ignore REPORTERROR (my way of display/flat-file logging errors). and "pISAPI" is just a pointer to a typedef of strings for the ISAPI properties that were set before a call to this function.
    +++++++++++++++++++++++++++
    Can any one pls explain what should I declare before calling the function CreateISAPIFilter(pISAPI).

    Thanks for the help.
    Palani

    Function:
    function CreateISAPIFilter(pISAPI)
    OBJECT myObj, objISAPI;
    begin
    if (UseDLL(SUPPORTDIR ^ "IsGetObj.dll") < 0 ) then
    REPORTERROR( "Could not load DLL: " + SUPPORTDIR ^ "IsGetObj.dll", SEVERE);
    endif;
    if (MyGetObject("IIS://localhost/W3SVC/Filters", "", myObj) = FALSE) then
    REPORTERROR ("Failure creating IIS object", SEVERE);
    endif;

    if (MyGetObject("IIS://localhost/W3SVC/Filters/" ^ pISAPI->sName, "", objISAPI) = FALSE) then
    try
    set objISAPI = myObj.Create("IIsFilter", pISAPI->sName);
    catch
    REPORTERROR ("Failure creating IIS ISAPI Filter: " + pISAPI->sName, SEVERE);
    endcatch;
    endif;
    try
    objISAPI.FilterPath = pISAPI->sPath;
    if !(myObj.FilterLoadOrder % pISAPI->sName) then
    myObj.FilterLoadOrder = myObj.FilterLoadOrder + "," + pISAPI->sName;
    endif;
    objISAPI.SetInfo();
    myObj.SetInfo();
    catch
    REPORTERROR("Unable to set ISAPI Filter properties for: " + pISAPI->sName, SEVERE);
    endcatch;
    UnUseDLL(SUPPORTDIR ^ "IsGetObj.dll");
    end;
    **********************************************

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •