This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Detecting Locked Files
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2009
11:14 AM
Detecting Locked Files
Hi all,
I have a request to add a feature to detect locked (or open) files on the end user's machine before attempting to lay any files down via my install. Does anyone have any suggestions on how to do this, or even if it is possible?
I'm running an InstallScript project with approximately 3000 files installed.
Thanks in advance!
I have a request to add a feature to detect locked (or open) files on the end user's machine before attempting to lay any files down via my install. Does anyone have any suggestions on how to do this, or even if it is possible?
I'm running an InstallScript project with approximately 3000 files installed.
Thanks in advance!
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2009
12:50 PM
The InstallScript engine will call the OnFileLocked event for any files that are detected as locked when attempting to overwrite or remove the file. The value returned from this event can be used to have the engine perform a specific action for the file (the default action is to copy/remove the file after reboot).
If you want to detect if any files are in use before file transfer, you could use Is(FILE_LOCKED) and FeatureFileEnum to enumerate all files in the setup and test if they are locked. However, this would likely be rather time consuming, and it may be simpler to detect if any known processes are running that could be using the files (see "List and Shut Down Running Applications" at http://installsite.org/pages/en/isp_ext.htm for one possible method for detecting running processes).
If you want to detect if any files are in use before file transfer, you could use Is(FILE_LOCKED) and FeatureFileEnum to enumerate all files in the setup and test if they are locked. However, this would likely be rather time consuming, and it may be simpler to detect if any known processes are running that could be using the files (see "List and Shut Down Running Applications" at http://installsite.org/pages/en/isp_ext.htm for one possible method for detecting running processes).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2009
01:36 PM
Thanks for your suggestions.