Jump to content


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.
Photo

Suppressing the Read-Only dialog


4 replies to this topic

Shreyas Malavia

Shreyas Malavia
  • Members
  • 2 posts

Posted 18 April 2001 - 13:28

How do I suppress the following dialog box with a default action of 'Yes' :

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.


lasenbby

lasenbby
  • Members
  • 744 posts

Posted 01 May 2001 - 13:49

Pull down menus on tool bar and select Misc... and File Read Only.  It wil place a routine in your code or take you to it...use ERR_YES - the file should be overwritten or removed.  Don't remove system files (ones in system32,system) on uninstall (Property page for system files file groups).

lasenbby

lasenbby
  • Members
  • 744 posts

Posted 01 May 2001 - 13:50

Ooops..  Sorry, that's in IS 6.

mat t

mat t
  • Members
  • 11 posts

Posted 08 May 2001 - 14:30

Probably a better way to do this but this is what I used:

///////////////////////////////////////////////////////////////////////////////
//                                                                           //
// 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


Shi Sherebrin

Shi Sherebrin
  • Members
  • 1 posts

Posted 25 September 2001 - 18:45

latest info: I figured out the problem, the k-base article was incorrect.  Their info shows how to suppress the dialog in the case of a silent setup (using the .iss file) - you put the same line in the setup.ini file, but include it under the [Startup] section.

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)