Read only File Detected
A read only file, C:\winnt\system32\msvcrt.dll, was found while attempting to copy files to the destination location. To over write the file, click the Yes button, otherwise click the No button.
Don't display this message againYes, No and Cancel buttons available.

Suppressing the Read-Only dialog
Posted 18 April 2001 - 13:28
Posted 01 May 2001 - 13:49
Posted 08 May 2001 - 14:30
///////////////////////////////////////////////////////////////////////////////
// //
// Function: ChangeAttributes //
// //
// Purpose: This function changes the attributes of a file to readable. //
//This stops messages appearing during the installation.//
// //
///////////////////////////////////////////////////////////////////////////////
function ChangeAttributes(szFileName)
STRING szValue, svResult;
NUMBER nType, nAttribute;
begin
//Find out if the file is on the user's system. If so make sure it's not read only
if( FindFile(WINSYSDIR, szFileName, svResult) = 0 )then
//Set attributes to readable...
nType = FILE_ATTRIBUTE;
nAttribute = FILE_ATTR_NORMAL;
szValue = "";
SetFileInfo (WINSYSDIR ^ szFileName, nType, nAttribute, szValue);
endif;
end;
I call that against the files I know the install has a problem with.
hth,
Matt
Posted 25 September 2001 - 18:45
caveat: I'm trying to do the same thing and have tried the solution below; so far it hasn't worked. another document I found suggested doing the same thing but in silent install mode, using the setup.iss file.
from the InstallShield knowledgebase, Q102836 (notes for maintenance release of v5.5)
...
5. Enhancement: Setup Can Suppress Display of Read-Only File Dialog Box.
The display of the Read-Only File dialog box (which is displayed when the setup attempts to install over a read-only file) can be suppressed by adding the following section and keyname to Setup.ini:
[File Transfer]
OverwriteReadOnly=
Allowed values of OverwriteReadOnly are NoToAll and YesToAll.
Previously, the Read-Only File dialog box could not be suppressed.
...
(Edited by Shi Sherebrin at 3:29 pm on Sep. 25, 2001)