IIS AccessFlags on a IIsWebDirectory

Got a problem you cannot solve? Try here.
Post Reply
Gigs
Posts: 3
Joined: Thu Jan 14, 2010 4:03 pm

IIS AccessFlags on a IIsWebDirectory

Post 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
Gigs
Posts: 3
Joined: Thu Jan 14, 2010 4:03 pm

Post 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
adi
Posts: 57
Joined: Mon Mar 22, 2010 8:28 am

Re: IIS AccessFlags on a IIsWebDirectory

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: IIS AccessFlags on a IIsWebDirectory

Post 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
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply