RE: changing permissions on folders in web setup project created in VS

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Felix Wang (v-felwa_at_online.microsoft.com)
Date: 08/12/04


Date: Thu, 12 Aug 2004 02:44:56 GMT

Hello,

Thanks for posting. Let me try to answer the questions one by one:

1. Is there better approach altogether to complete our task? Perhaps use
wmi? We need some direction here and samples if possible.

As far as I know, ADSI can also be used to set NTFS permissions. The
following KB article is for your reference:

HOW TO: Programmatically Set NTFS File System Folder Permissions by Using
Microsoft Visual Basic .NET
http://support.microsoft.com/?id=818362

On the other hand, we can automate the modification of the MSI to some
extent, by using VBScripts.

Windows Installer Automation Interface
http://msdn.microsoft.com/library/?url=/library/en-us/msi/setup/automation_i
nterface.asp?frame=true

2. How to find out which account is running the ASP.NET application (web
site or virtual root) that we just installed, so that we could give right
to that account only.

One option to achieve this is to use XPath to parse the machine.config
manually and read out the "processModel" settings. However, the
processModel setting only works for IIS 5. If the target platform also
includes Windows 2003 with IIS 6, we may need to do some additional work. I
would suggest that you post a question under IIS' newsgroup on how to
programatically retrieve application pool identity in IIS 6.

3. How can we get original permissions of a folder and than revert to them
as some later point?

I am not sure why we need to do this. During the uninstallation, the folder
should be removed at all. If you really need to achieve this, I think ADSI
will help.

4. Perhaps new Visual Studio 2005 (Whidbey) could help? Would it support
application that is built using .NET 1.1?

>From Whidbey Beta 1 preview, there are not much improvements in Setup
project. It *SHOULD* have backward compatibility with previous versions.
However, it is a little bit earlier to say so, since the product has not
yet been released. You may take a preview on Whidbey at the following site:

http://lab.msdn.microsoft.com/vs2005/get/default.aspx

I hope the information is useful to you.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.



Relevant Pages

  • RE: no OWA
    ... have the correct permissions was the "inetpub" folder. ... Correct the settings in IIS: ... click to check the "Hide All Microsoft Services" ...
    (microsoft.public.windows.server.sbs)
  • Re: Minimum NTFS Permissions - Theres such a thing???
    ... ?2001 Microsoft Corporation. ... HOW TO: Set Minimum NTFS Permissions Required for IIS 5.0 to Work WGID:198 ... " List Folder Contents" ...
    (microsoft.public.inetserver.iis.security)
  • Re: recurring 1058/1030 USERENV events every 5 mins
    ... This posting is provided "AS IS" with no warranties, ... The policy causing the 1058 messages ... permissions either so surely if this was the issue the messages ... Root folder is the highest folder so "windows" ...
    (microsoft.public.windows.server.general)
  • Re: Minimum NTFS Permissions - Theres such a thing???
    ... ?2001 Microsoft Corporation. ... > permissions that you must have to run Internet Information Services ... > third-party applications in an IIS 5.0 environment. ... Open the properties for the %systemroot%\Winnt folder, ...
    (microsoft.public.inetserver.iis.security)
  • RE: Internet Printers Problems
    ... the \Exchsrvr\Exchweb folder are incorrect. ... caused by incorrect permissions. ... Verify that the Authenticated Users group has the following permissions: ... 306005 How To Repair IIS Mapping After You Remove and Reinstall IIS ...
    (microsoft.public.windows.server.sbs)