Reboot before upgrade or uninstall (Explorer extension) - Advanced Installer Community
konstantinkoll
Posts: 15
Joined: Fri May 27, 2011 2:45 am

Reboot before upgrade or uninstall (Explorer extension)

Dear Advanced Installer team,

we just ran into another snag in preparing the installer for our product. Among the application itself, an Explorer namespace extension in a DLL gets installed. Deploying the product works fine, including some custom actions.

Problems arise when uninstalling or upgrading the product. The namespace extension DLL is still in use by the Windows Explorer, and cannot be uninstalled. In addition, a nasty "file is in use" dialog appears, which cannot shut down the Explorer. After browsing this forum, I've installed 2 custom actions taken from your RebootAfterUpgrade sample, and changed the conditions to REMOVE="ALL" AND NOT AFTERREBOOT. Uninstall gets correctly suspended, but no reboot takes place. After rebooting manually, an error message is displayed stating that the installer package cannot be found.

How can we achive the disred result of uninstalling/upgrading the product after a reboot, but before the Windows Explorer is launched? I've attached the .aip file along with the two VB scripts.

Thank you very much for your help,
Konstantin
Attachments
Setup.zip
(13.29 KiB) Downloaded 514 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Reboot before upgrade or uninstall (Explorer extension)

Hi Konstantin,

You don't need custom actions for this. In "Install Parameters" page you can set the "Reboot Behavior" combo to Force reboot after install. Additionally, you can check the "Perform the reboot if required without showing any prompts" option.

This way the machine will be rebooted automatically after install. Windows Installer automatically updates files in use after a reboot. You don't need to suspend the installation and start it again later.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
konstantinkoll
Posts: 15
Joined: Fri May 27, 2011 2:45 am

Re: Reboot before upgrade or uninstall (Explorer extension)

Thank you very much, Cosmin. Unfortunately, a reboot is rquired before any changes are made, so the files aren't occupied by the Windows Explorer.
-Konstantin
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Reboot before upgrade or uninstall (Explorer extension)

Hi Konstantin,

It doesn't work that way. During install Windows Installer detects files which are being used by running processes. In there are used files, a prompt will be shown allowing the user to close the processes or reboot after installation. If the processes are not closed, Windows Installer adds those files to a special update list.

After the install is completed, the machine can be rebooted. After reboot, Windows Installer will automatically update all files in that update list. This is how Windows Installer handles files in use.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
konstantinkoll
Posts: 15
Joined: Fri May 27, 2011 2:45 am

Re: Reboot before upgrade or uninstall (Explorer extension)

Cosmin,

let me try to explain it another way. When our product is uninstalled, the namespace extension is still occupied by the Windows Explorer. A window appears where the user can choose to terminate the Explorer. If he chooses to, the Explorer gets killed, but is not restarted after uninstall is complete. The user is left with a blank desktop. What can we do to make uninstall foolproof?

-Konstantin
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Reboot before upgrade or uninstall (Explorer extension)

Hi,

You can schedule a reboot after the installation. This is the most used solution when updating files which are being used by a running process. Please note that the files in use dialog also contains the "Do not close applications (a reboot will be required)" option.

Another approach would be to launch explorer.exe through a custom action scheduled under InstallExecuteSequence -> InstallFinalize. But I still recommend the reboot.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
konstantinkoll
Posts: 15
Joined: Fri May 27, 2011 2:45 am

Re: Reboot before upgrade or uninstall (Explorer extension)

Cosmin,

uninstall is working now, thank you! But how can be suppress the reboot on first-time install? Now reboot is required here.

-Konstantin
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Reboot before upgrade or uninstall (Explorer extension)

Hi Konstantin,

You can use the Reboot Behavior combo in Install Parameters page.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”