PDA

View Full Version : Removing Read-Only Attribute on a File



NewsArchive
01-18-2006, 01:13 AM
I have a couple of files with the read-only attribute set on them that need
to be deleted when the uninstaller runs via a custom uninstall include
scropt. I thought one would use the "Set File Attributes" function to
remove the read-only attributes from the files, but it does not appear to
work to clear attributes.

Am I missing something?

Thanks,
-Brian

NewsArchive
01-18-2006, 01:13 AM
Brian,

I have tested this with SetupBuilder 5.2 build 1354 and the following
removes the read-only attribute from O365.chm

Set File Attributes for "c:\sb5test\O365.chm"

No checkbox marked clears all file attributes. BTW, we are using this
function in all of our own installation projects.

Do you have build 1354 or an earlier version?

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
01-18-2006, 10:47 AM
Yes, I am using version 5.2.1354 and my command looks like

Set File Attributes for "%_SB_INSTALLDIR%\Database\*.*"

Are wildcards acceptable here?

I'm also assuming that %_SB_INSTALLDIR% is populated as well...

Perhaps I need to display a message box to verify this.

Thanks,
-Brian

NewsArchive
01-18-2006, 10:48 AM
Brian,

Press F1 <g>.

"[in] String that specifies the name of the file whose attributes are to
be set. Wildcard characters, such as "*", are not permitted."

BTW, the "Delete Local File(s)" script function supports wildcards. I'll
see if it is possible to add a "Remove read-only attribute" option to that
function. Seems to be a good idea.

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
01-19-2006, 10:41 AM
I think we can add the "Remove read-only attribute" option in the
"Delete Local File(s)" script function to the next build (will be
available this week).

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
01-19-2006, 10:42 AM
That would be great.

Thanks,
-Brian