Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

charhook.dll cannot be overwritten during reinstallation process #122

Closed
nvaccessAuto opened this issue Jan 1, 2010 · 7 comments
Closed

Comments

@nvaccessAuto
Copy link

Reported by vtsaran on 2008-06-24 17:47
During reinstallation of NVDA, i.e. when overwriting existing installation, the installer is unable to update charhook.dll because it is write-protected, thus causing "abort/ignore/retry" error during the installer. Even if NVDA is forcefully shut down, charhook.dll still stays in memory and does not unlink until the next restart of the computer.

@nvaccessAuto
Copy link
Author

Comment 1 by vtsaran on 2008-06-24 17:49
Changes:
Changed title from "charhook.dll cannot be unregistered during reinstallation process if NVDA is running" to "charhook.dll cannot be unregistered during reinstallation process"

@nvaccessAuto
Copy link
Author

Comment 2 by vtsaran on 2008-06-24 17:56
Small correction (since there seems to be no way to edit actual description): the dialog produced by the installer when the write-protected file is encountered is "abort/ignore/retry".

@nvaccessAuto
Copy link
Author

Comment 3 by jteh on 2008-06-25 02:39
We have investigated this and found the following:

  • This library does not always fail to unload. On my system, it does seem to be unloaded most of the time.
  • We do this using a global hook installed using !SetWindowsHookEx. Using this mechanism, the system loads the library into other processes; we do not explicitly load it. Thus, we can't explicitly unload it. The documentation notes that the library is not explicitly and immediately unloaded, so one assumes the system does it at its leisure.
  • We may be able to get around this by hooking individual threads instead of setting a global hook. In this case, the documentation notes that the system is supposed to explicitly unload the library when the hook is removed.
  • Nevertheless, we're not certain this will fix the problem in all cases.
  • We really should be using the !InstallLib macro in NSIS to install libraries. Among other things, this handles dll versioning, handles reboots if required and allows us to bypass Windows file protection. This should be done for all dlls we install.
    • This will require that these dlls be installed separately from the rest of the package.

@nvaccessAuto
Copy link
Author

Comment 4 by vtsaran on 2008-06-25 21:28
Never heard of the !InstallLib macro; will investigate.

@nvaccessAuto
Copy link
Author

Comment 5 by jteh on 2008-06-26 01:57
I have made the appropriate changes to use !InstallLib. Shall commit later today.

@nvaccessAuto
Copy link
Author

Comment 6 by jteh on 2008-06-26 03:53
We now use !InstallLib and !UninstallLib as of r2161. This means that the installer will now request a reboot if required when handling libraries. Please test and comment.
Changes:
Changed title from "charhook.dll cannot be unregistered during reinstallation process" to "charhook.dll cannot be overwritten during reinstallation process"

@nvaccessAuto
Copy link
Author

Comment 7 by jteh on 2008-08-11 22:59
No one has reported any issues with this fix, nor any reoccurrence of this problem.
Changes:
State: closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant