Loading
Default application pool write-access
Hey guys,

 

Considering how IIS default application pool user identity evolved on different windows editions, can someone tell if there is a generic way to grant write access to specific folder in the web application folder.

 

The installer I am working on should work on multiple Windows editions and I am trying to know what options do I have to simplify the process.

  • Do you mean something like this? We use this code in the Feature_Installed() section of FeatureEvents.rul in an InstallScript Only project:

     

    SdShowMsg( "Modifying Web Files", TRUE );

     

    strPath = TARGETDIR ^ "Website";

     

    if SYSINFO.WINNT.bWinServer2003 = TRUE then

     

    szIISAccount = "IIS_WPG:F";

     

    elseif SYSINFO.WINNT.bWin7_Server2008R2 = TRUE || SYSINFO.WINNT.bWinVista_Server2008 = TRUE then

     

    //new in IIS7: IIS_IUSRS replaces IIS_WPG

     

    szIISAccount = "IIS_IUSRS:F";

     

    endif;

     

    LaunchAppAndWait( WINSYSDIR ^ "cmd.exe", "/c cacls \"" + strPath + "\" /T /E /G " + szIISAccount, WAIT );

     

    SdShowMsg( "Modifying Web Files", FALSE );

     

    HTH
    Expand Post

Loading
Default application pool write-access