Page 1 of 1

IIS AccessFlags on a IIsWebDirectory

Posted: Thu Jan 14, 2010 4:30 pm
by Gigs
Hi,
I try to modify (get or set) the accessFlags on an IIsWebDirectory.
This is not a Web Site or a Virtual Directory. It’s a folder under a Virtual Directory.

The following lines work well:

Code: Select all

Comment: Getting the AccessFlags of the Default Web Site
Get IIS Folder Property "AccessFlags" into variable IISRIGHTS from site #1

Code: Select all

Comment: Getting the AccessFlags of a Virtual Dir under Default Web Site
Get IIS Folder Property "AccessFlags" into variable IISRIGHTS from site #1/myvirtualdir
But is there a way to do the same thing with a sub-folder inside my virtual directory?
I have tried the following command but it’s always returns: !Error!

Code: Select all

Get IIS Folder Property "AccessFlags" into variable IISRIGHTS from site #1/myvirtualdir/subdir
Thx


Ps: I’m using IA9 and IIS6.0

Posted: Mon Jan 18, 2010 10:23 am
by Gigs
I didn't find a way to do it with Native InstallAware commands.

So, here is how to do it with a shell call to ADSUtil.vbs.
(we assume the IIS AdminScripts folder is next to WWWROOTDIR)

Code: Select all

Set Variable IISFolder to $WWWROOTDIR$
Extract Parent Folder: IISFolder
Set Variable ADSUtil to $IISFolder$/AdminScripts/adsutil.vbs

Set Variable SITEINDEX to 
Get IIS Index for Site "Default Web Site" into SITEINDEX
Set Variable IISRESULT to 
Run Program Cscript.exe /nologo $ADSUtil$ SET "W3SVC/$SITEINDEX$/ROOT/MY_WEBSITE/MY_VDIR/SUBFOLDER/AccessFlags" "519" (WAIT, get result into variable IISRESULT)
For more informations about IIS Command-line Tools included in IIS: http://msdn.microsoft.com/en-us/library/ms525006.aspx
For more documentation about ADSUtil see: http://www.microsoft.com/technet/prodte ... x?mfr=true
For more informations about AccessFlag see: http://msdn.microsoft.com/en-us/library/ms525016.aspx

Cheers
Gigs

Re: IIS AccessFlags on a IIsWebDirectory

Posted: Wed Aug 10, 2011 7:08 am
by adi
Gigs wrote:
But is there a way to do the same thing with a sub-folder inside my virtual directory?
I have tried the following command but it’s always returns: !Error!

Code: Select all

Get IIS Folder Property "AccessFlags" into variable IISRIGHTS from site #1/myvirtualdir/subdir
Ps: I’m using IA9 and IIS6.0
I run into exactly the same problem today using IA11 / IIS6.
Dear IA team: when is this bug going to be fixed?

Best regards,
adi

Re: IIS AccessFlags on a IIsWebDirectory

Posted: Wed Aug 10, 2011 1:58 pm
by giaviv
Dear adi,

As of now, the only way to achieve that is to use the IIS command line management tools and invoke them with InstallAware.

Here is an example of how to do this with the TCP port:
http://www.installaware.com/forum/viewt ... f=2&t=6253