Bug 139 - Windows install fails: harpoon.dll
Status:
RESOLVED FIXED
Component:
Build-Env
Version:
1.0.0
Hardware:
PC Windows 2000
Importance:
P3 major
Target Milestone:
---
Assignee:
Raymond Penners
URL:
Depends on:
Blocks:
Reported:
Nov 4 2002 00:10:56 UTC
by:
Arnaud Gouder
Modified:
Aug 19 2003 16:33:35 UTC
CC List:
Kees-Jan Dijkzeul
WhoWhenWhatRemovedAdded
Raymond PennersNov 6 2002 11:34:48 UTCassigned_toRob CaelersRaymond Penners
Raymond PennersFeb 13 2003 12:11:44 UTCblocks175
Raymond PennersMar 4 2003 05:47:19 UTCstatusNEWASSIGNED
Raymond PennersMar 4 2003 10:17:01 UTCstatusASSIGNEDRESOLVED
resolutionFIXED
Raymond PennersAug 19 2003 02:10:27 UTCccKees-Jan Dijkzeul
Kees-Jan DijkzeulAug 19 2003 03:36:11 UTCstatusRESOLVEDREOPENED
resolutionFIXED
Raymond PennersAug 19 2003 16:33:35 UTCstatusREOPENEDRESOLVED
resolutionFIXED
Description
Arnaud Gouder  Nov 4 2002 00:10:57 UTC
When I tried to install 1.0.0, I got an error that it could not write 
harpoon.dll. 

To a 'normal' user, this is quite a major error, since it means he can't 
install wr.

I did not have WR running when I tried to install 1.0.0, so that's not what 
caused this. Then I tried to uninstall the previous version, and that helped, 
becuase now I could install 1.0.0 without any problems.
Comment 1
Raymond Penners  Nov 6 2002 11:34:48 UTC
So, you're indicating that installing the program on top of an already installed
Workrave does not work, whereas uninstallating the old version first works fine.
Did I understand you correctly?
Comment 2
Raymond Penners  Mar 4 2003 05:47:19 UTC
Kees-Jan, opinions please?

The problem is, I can set configure the "RestartReplace" for harpoon.dll which
solves this bug.
However... see IMPORTANT below.

restartreplace
==============
This flag is generally useful when replacing core
system files. If the file existed beforehand and was found to be
locked resulting in Setup being unable to replace it, Setup will
register the file (either in WININIT.INI or by using MoveFileEx, for
Windows and Windows NT respectively) to be replaced the next time the
system is restarted. When this happens, the user will be prompted to
restart the computer at the end of the installation process.


IMPORTANT: The restartreplace flag will only successfully replace an
in-use file on Windows NT platforms if the user has administrative
privileges. If the user does not have administrative privileges, this
message will be displayed: "RestartReplace failed: MoveFileEx failed;
code 5." Therefore, when using restartreplace it is highly recommended
that you have your installation require administrative privileges by
setting "PrivilegesRequired=admin" in the [Setup] section.
Comment 3
Kees-Jan Dijkzeul  Mar 4 2003 06:21:27 UTC
I don't understand how uninstalling workrave first helped Arnaud.

I used to have the problem that, when uninstalling wr, harpoon.dll could not be
removed because there were still windows apps using it. Hence, a subsequent
install would fail, because it could not overwrite harpoon.dll, unless you do a
reboot in between.

My favourite workaround is to first uninstall, then rename harpoon.dll, and then
install. You'll be using a mix of old and new harpoon.dlls until the next
reboot. I guess setting RestartReplace property does something similar.

Anyway, I have not recently encountered this problem where I could not uninstall
workrave, hence I do not have this problem anymore (may be related to my
switching to XP?)

I'm not very familiar with our current userbase. As far as I know, I was the
only user not having admin privileges. This has been fixed now, too. Hence,
turning on RestartReplace may be an easy solution to this problem (which doesn't
exist for me any more)

I'm also not very familiar with windows setup procedures. Arnaud says
uninstalling first (I assume without rebooting) works for him. So then why does
the upgrade procedure fail? (assuming it does an implicit uninstall)

Maybe you can modify the installation procedure to include my workaround
renaming harpoon.dll and then requesting a reboot. This would be like
implementing RestartReplace yourself, except that you probably don't have the
opportunity to remove the renamed harpoon.dll. Then again, I don't think that hurts.

I'm not very fond of programs requiring a reboot as part of the installation
process. Especially in case of workrave, since I always tend to upgrade in the
middle of my work (one of the privileges of alpha testing :-). But then again,
if this is the safe way to go, it might be worth while. I can always say "no".

Does any of this make any sense?
Comment 4
Raymond Penners  Mar 4 2003 06:32:08 UTC
Okay. I'll just mark harpoon.dll as 'restartreplace', but to keep non-admin
users happy I will not require admin privileges. That means that these users may
be confronted with that weird message.

I cannot implement your workaround, the installer scripting is not that powerful...
Comment 5
Raymond Penners  Mar 4 2003 10:17:01 UTC
I think I fixed this, but as I cannot always reproduce it, please test.

Comment 6
Raymond Penners  Aug 19 2003 02:10:35 UTC
*** Bug 282 has been marked as a duplicate of this bug. ***
Comment 7
Kees-Jan Dijkzeul  Aug 19 2003 03:36:12 UTC
I get an access violation for harpoon.dll (see bug 282). As far as I know, I'm
local administrator. Also, I do not get the error message mentioned in the
"restartreplace" explanation.

My best guess is that the installation process is not "restartreplace"-ing at
all, but instead attempting to delete the original harpoon.dll, while some
programs still have it open. Maybe other applications need some time to unload
harpoon.dll after wr has finished??
Comment 8
Raymond Penners  Aug 19 2003 16:33:35 UTC
The file harpoon.dll was processed twice by the installer, and the 2nd time it
did not have the restartreplace file toggled on.

Fixed.

Please give http://www.workrave.com/files/workrave-win32-1.4.0-test4.exe a try.