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

Renaming previously installed file


1 reply to this topic

steven1j

steven1j
  • Members
  • 1 posts

Posted 12 March 2002 - 21:37

History: One of the components to the install is a database. The database should only be installed in certain conditions.

Conditions: If the machine does not have the database installed on it then the database will be installed to the machine by default.
If the machine does have an older version of the database installed then the user will be asked which database they would like to use. Selecting the new database will rename the old database to name.old, and install the new database. Selecting the old database will do nothing.

Problem: I have tried to use the movefile table to rename the databse. It uses a component with the right condition associated with it. As a test the new database was not included as part of the component.

There is a separate component that has the database included in it and it seems to always install itself, even if the condition evaulates to false.

Can anyone help?

Thanks

Scott Williams

Scott Williams
  • Members
  • 38 posts

Posted 13 March 2002 - 23:37

Tricky situation.  I guess I would suggest doing it in a custom action in VBScript.  You can use the FileScriptingObject to copy the file early on in your install, and then the one in your install should get moved into place.  

I'm not sure how you stop the new file from always going onto the system though.