Re: Create a writable folder in aspnet setup project

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: roger (xrsr_at_rogerware.com)
Date: 10/23/04


Date: Sat, 23 Oct 2004 05:50:31 GMT

For the record,

I don't know whether this qualifies as clever or stupid,
but what I decided to do just use Process.Start to run
a cacls command from my custom install action in order
to manipulate the permissions for the folder in question.

Good enough for my purposes.

roger <xrsr@rogerware.com> wrote in news:Xns958887090C336rsrrogerwarecom@
204.127.199.17:

> Thanks for that tip.
>
> However, when I load the activeds type library into my solution,
> The symbols that I see in the ActiveDs namespace don't match
> up with the code that this example shows.
>
> According to the properties for the ActiveDs type library that I see,
> it's version 1.0. Perhaps I have an older version than this example
> assumes or something.
>
>
> I've got Windows 2000 SP4, the .NET 1.1 framework,
> and Visual Studio 2003.
>
> I'll need to study more about ActiveDs to figure out what's up.
>
> Unless anyone has any ideas....
>
>
> "Naveen K Kohli" <naveenkohli@hotmail.com> wrote in
> news:OwaxIdjtEHA.3292@TK2MSFTNGP12.phx.gbl:
>
>> Goto the following link and there you will find an example on how to
>> change permisisons on a file object. Use the same method for folder.
>>
>> http://www.netomatix.com/DirectoryServices.aspx
>>
>> Naveen Kohli
>>
>> "roger" <xrsr@rogerware.com> wrote in message
>> news:Xns95877AA454A1Drsrrogerwarecom@63.240.76.16...
>>> I've created a web setup project for my aspnet app, and added
>>> a web folder item "tmp" to the File System editor under the web
>>> application folder.
>>> (My app uses this folder for generating image files and such)
>>>
>>> Problem is, I can't figure out how to make this folder writable by
>>> the ASPNET user during installation.I've set the writable property
>>> for the new folder object, but it doesn't give the permission to
>>> the ASPNET user.
>>>
>>>
>>> I thought to try and create a custom install action and manipulate
>>> the directory permissions in there, but I can't figure out
>>> how to change the current access permissions of an existing
>>> directory. Alternatively, I could just create the tmp folder in the
>>> custom action, but I don't see how to specify the permissions when
>>> creating a directory. I see the FileStream constructor takes a
>>> FileAccess argument, but I don't see any mechanism to pass one of
>>> those to Directory.CreateDirectory...
>>>
>>>
>>> Any help appreciated..
>>>
>>> Thanks
>>>
>>>
>>
>>
>
>



Relevant Pages

  • Re: Create a writable folder in aspnet setup project
    ... I don't know whether this qualifies as clever or stupid, ... a cacls command from my custom install action in order ... >> change permisisons on a file object. ... Use the same method for folder. ...
    (microsoft.public.dotnet.general)
  • Re: Cannot delete fonts to reinstall
    ... The CACLS command also works with XP Pro, you can use it to check permissions. ... How to disable simplified sharing and set permissions on a shared folder in Windows XP ... I assume I have proper NTFS permissions for the Fonts folder and the font files, but you better tell me how to check the permissions and what they should be. ...
    (microsoft.public.windowsxp.general)
  • Re: How can I manage/access System Volume Information to free up space?
    ... With XP Home without a doubt the easiest way to do it is with the cacls command, there is no need to change Simple File Sharing or anything else: ... Bill Smitty wrote: ... You can use the CACLS command to gain access to the folder: ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Clickonce deployment to local drive
    ... I've built an application in visual studio 2005 express and published ... several times and a new version appears in the folder and the setup ... obviously stupid things is that they are never obvious to the person ...
    (microsoft.public.dotnet.framework)
  • Re: Shortest code for Sub FileExists and DirExists
    ... if I can create one in a certain folder and write into it. ... Not stupid at all. ... A boolean return is "self documenting", i.e. it won't be confusing if you ... It's also kinda common ...
    (comp.lang.basic.visual.misc)