Menu

#309 Uninstaller deletes components on reboot after reinstall

2.0 Beta Series
closed-fixed
Scripting (211)
5
2007-01-24
2005-01-07
Anonymous
No

I'm using 2.03, and the new "DLL/TLB Library Setup"
features.

Example: NSIS installs an explorer shell extension. I run
explorer the dll is loaded. I run the NSIS uninstaller to
install the dll while it is in use. The dll is marked to be
uninstalled on reboot.

But instead of rebooting I install the program again

bug #1. NSIS does not detect the dll is in use it just
proceeds like nothing happened. (maybe it did a file
check and decided not to replace the dll?). I was
expecting it to say something like "This dll is already in
use, please reboot before installing" or something.

bug #2. I reboot, but the dll was marked for deletion on
reboot even after I reinstalled it. So when the system
reboots the dll is DELETED while the program is listed as
installed!

I know it makes no sense to uninstall, mark a dll for
deletion on reboot, and then reinstall without rebooting
but that's what users do. Anyways NSIS should check
on install if a dll is already marked for a reboot deletion
and undo it.

thanks. great program

Discussion

  • Amir Szekely

    Amir Szekely - 2005-02-17
    • assigned_to: nobody --> joostverburg
     
  • Amir Szekely

    Amir Szekely - 2005-02-17
    • summary: Uninstaller deletes components on reboot after install --> Uninstaller deletes components on reboot after reinstall
     
  • Stefan Bertels

    Stefan Bertels - 2005-04-07

    Logged In: YES
    user_id=1119337

    Hi Joost,

    there's some order issue regarding Library.nsh. I discussed
    (and in some quick way) solved this here:
    http://forums.winamp.com/showthread.php?s=&threadid=211446

    You may look into that before solving this "reinstall issue".

     
  • Stefan Bertels

    Stefan Bertels - 2005-04-07

    Logged In: YES
    user_id=1119337

    another note: some combined solution (order solution and
    reinstall issue) could be in making the macros in
    library.nsh fully ordered -- not only in one session (my
    solution). That way all problems are gone: The reinstall
    issue would cause delete on reboot but after that it would
    cause install -- so no special "delete RunOnce key action"
    in the installer is needed. It's some cleaner way, anyway.
    The main problem with this is how to make the RunOnce
    entries in the right order (that's why I did that session
    thing). I two installers run concurrently that might result
    in a wrong order if you don't use some mutex. If you use
    some windows mutex you should note that Windows 2003 is
    somewhat different. IIRC: You have to prefix a mutex name
    with "Global\" to work on multiprocessor machines. Maybe
    just this string isn't allowed as mutex name on older
    Windows versions (95). Don't know exactly.

     
  • Amir Szekely

    Amir Szekely - 2007-01-24

    Logged In: YES
    user_id=584402
    Originator: NO

    Fixed, as discussed in the forum. Files are renamed before they Delete /REBOOTOK is called, so install-uninstall-install sequence won't result in missing files after reboot. First, it tries to move the file to $TEMP. Next, it'll try to move it to the same directory, only with a temporary name. Finally, if the file is completely locked, it'll just use the old method.

    This doesn't solve the problem for old installers, but I prefer that over messing with PendingFileRenameOperations in the registry.

    Thanks.

     
  • Amir Szekely

    Amir Szekely - 2007-01-24
    • assigned_to: joostverburg --> kichik
    • status: open --> closed-fixed
     

Log in to post a comment.