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

Handling Locked Files with InstallScript


1 reply to this topic

c-dogg

c-dogg
  • Members
  • 1 posts

Posted 06 May 2005 - 15:05

All, looking for a little help here with handling files that are locked at the time the install is run. I am relatively new to InstallShield so this may be something very simple.

I am working on a new InstallShield package that will replace some existing files on a shared drive. Before I try replacing them, I copy the files that will be updated to a backup directory. Then while the new files are being updated, if a file is locked, I want to be able to display a message to the installer, rollback all of the updated files back to their original state, and then abort. Any idea how I would do that?

I noticed that there is an OnFileLocked event. Does this need to be called anywhere or will Installshield automatically fire it off if it encounters a locked file? I've tried installing while running one of the files that was to be updated, but it didn't seem to fire that event. I have Potentially Locked set to No for the component.

Any ideas? Thanks.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 09 May 2005 - 14:07

The event will be fired automatically.
Of course you must set "potentially locked" to yes.