This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- clear read-only attribute for Web.Config when specified as Content files
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 24, 2011
06:00 PM
clear read-only attribute for Web.Config when specified as Content files
I am using ISLE-2011 to setup an asp.net app on windows 2008, including setup a new web site and application in IIS. There appears to be a known issue where the install will fail on 2008 if web.config that is being installed is marked as read-only. I am specifying this file in ISLE indirectly, via the ASP.NET web project's "Content Files".
I tried clicking on this "Content Files" entry in my "destination computer's files" (bottom right pane in ISLE files view), right clicking, select properties, checking the "Override System attributes", and then making sure the "Read Only" checkbox is clear. However, this does not fix the problem.
I verified that adjusting the "Content Files" entry's settings this way seems to have no effect on the files installed by manually changing the actual web.config file's read-only attribute to false, and then successfully installing. At this point, I view the attributes of the the files installed, and all the installed files except web.config are still set to read-only, even though I set the "Override System attributes" box and cleared the "read only" box for the "Content files" entry.
I'd like to continue to use the "Content files" entry, instead of manually linking to files, because it avoids missing files when added, and also manually adding explicit links seems to put the full path to the file - which won't work for me because I'm using tfs build.
How can I get "web.config" to be copied via "Content files" but still be marked as not-read-only, without having to actually set the web.config file to not be read only? I don't want to set the actual file to be not read only because I'm reading the files from TFS via tfs build (msbuild.) I suppose I could create some custom build step somewhere that changes the file attrib somewhere or checks out the file, but that seems hokey.
I tried clicking on this "Content Files" entry in my "destination computer's files" (bottom right pane in ISLE files view), right clicking, select properties, checking the "Override System attributes", and then making sure the "Read Only" checkbox is clear. However, this does not fix the problem.
I verified that adjusting the "Content Files" entry's settings this way seems to have no effect on the files installed by manually changing the actual web.config file's read-only attribute to false, and then successfully installing. At this point, I view the attributes of the the files installed, and all the installed files except web.config are still set to read-only, even though I set the "Override System attributes" box and cleared the "read only" box for the "Content files" entry.
I'd like to continue to use the "Content files" entry, instead of manually linking to files, because it avoids missing files when added, and also manually adding explicit links seems to put the full path to the file - which won't work for me because I'm using tfs build.
How can I get "web.config" to be copied via "Content files" but still be marked as not-read-only, without having to actually set the web.config file to not be read only? I don't want to set the actual file to be not read only because I'm reading the files from TFS via tfs build (msbuild.) I suppose I could create some custom build step somewhere that changes the file attrib somewhere or checks out the file, but that seems hokey.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 26, 2011
08:21 AM
Hi,
I am currently looking into this Issue.I should have further updates at the earliest.
Thanks,
Madu
I am currently looking into this Issue.I should have further updates at the earliest.
Thanks,
Madu
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 31, 2011
04:18 AM
Hi,
You can change the file attribute from a MS Build Script by using the Exec with the command attribute
This will remove the read-ony attribute from the myFile.ext file in the solution folder.
Thanks,
Madu
You can change the file attribute from a MS Build Script by using the Exec with the command attribute
This will remove the read-ony attribute from the myFile.ext file in the solution folder.
Thanks,
Madu
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 01, 2011
10:33 AM
Thanks, Madusree.
I haven't tried an explicit msbuild task for the workaround as you described, but I was able to workaround the problem by defining a pre-build event that runs the "attrib -r" cmd for the web.config.
However, as I mentioned in my original post, it seems this is really a workaround to the "Override System attributes" installshield function not working as a way to clear the read-only flag. Is this a known bug with a fix scheduled?
Thanks a bunch!
I haven't tried an explicit msbuild task for the workaround as you described, but I was able to workaround the problem by defining a pre-build event that runs the "attrib -r" cmd for the web.config.
However, as I mentioned in my original post, it seems this is really a workaround to the "Override System attributes" installshield function not working as a way to clear the read-only flag. Is this a known bug with a fix scheduled?
Thanks a bunch!