Hi Folks,
I have a silly problem, but, it's one I haven't run into before.
I want to be able to install my application so that none of the folders created are "read only". I have tried a few different approaches (in DevStudio 9), but I am having no luck.
I tried the following function attached to a CA at the end of the install:
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Setting all folders "Read/Write"
Started by
mpento
, Feb 06 2006 21:19
2 replies to this topic
Posted 06 February 2006 - 21:19
CODE |
function SetFolderAttributes(hMSI) number nResult, nType, nAttribute; string szFolder, szValue; begin szFolder = INSTALLDIR; szValue = ""; nType = FILE_ATTRIBUTE; nAttribute = FILE_ATTR_NORMAL; nResult = SetFileInfo(szFolder, nType, nAttribute, szValue); if (nResult != 0) then return nResult; endif; return 0; end; |
But, not only did it not clear all attributes for all children of the root folder, it didn't even do it for the root folder itself that is pointed to by INSTALLDIR. It doesn't appear that IS has a way of doing this, I can go into the properties of individual files and change their attributes from within the IDE, but, apparently, this is not the case for folders.
Anyone have any clue on this one? I am sure that this is just me being pigheaded and stupid, so, any help would be greatly appreciated.
Thanks,
Mike
Posted 07 February 2006 - 18:54
Why do you create them as read only in the first place?
Stefan Krüger
InstallSite.org twitter facebook
Posted 07 February 2006 - 22:38
QUOTE |
Why do you create them as read only in the first place? |
I didn't actually. Or at least I dont think I did. Folders in InstallShield don't appear to have a setting for "Read Only", this can be done with files only.
So, all folders show up "Read-Only" after install. The good news is, this ended up not being my problem, and after looking through some documents on MSDN (http://support.micro....com/?id=326549) it appears that Windows doesn't care about the folder read-only bit.
My problem ended up being an issue with user permissions for folders under our application install folder.
Thanks though for the quick reply. :-D
- Mike