cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vickenk
Level 4

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.
Labels (1)
0 Kudos
(1) Reply
ch_eng
Level 7

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
0 Kudos