Problem with uninstall process - Advanced Installer Community
sashag
Posts: 5
Joined: Mon Oct 05, 2015 9:11 pm

Problem with uninstall process

Hi Gents,

I have a problem with uninstall process. During this process I got the message:
"The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup."

My application have a windows service is running when I'm going to activate the uninstall process.
I added a predefined custom action "Detect service" and "Stop Service" as explained in Advanced Installer User Guide before "Wizard Dialogs Stage" -> "Searches" in order to stop the service, but it's not working.

I tried to play with installation option and parameters "reboot behavior" = "Suppress all reboots" and added "MSIRESTARTMANAGERCONTROL" = "Disabled" but I continue to get this message.

Parameters: OS - Windows 8.1, Windows Installer - 12.4.2 build 66135.

Any idea?
sashag
Posts: 5
Joined: Mon Oct 05, 2015 9:11 pm

Re: Problem with uninstall process

I solved this issue and successfully uninstalled my application without any message.

Now I got the same error during the patch running (msp file).

Any idea?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Problem with uninstall process

Hello and welcome to Advanced Installer forums,
I have a problem with uninstall process. During this process I got the message:
"The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup."
Indeed, the correct approach is to use a detect and stop service custom action approach.
This dialog ("FilesInUse" on XP and "MsiRMFilesInUse" on Vista) is shown automatically by Windows Installer during the InstallValidate standard action when the installer checks if any file (which will be affected by the installation process) is in use and if so, it displays that dialog.
Now I got the same error during the patch running (msp file).
Can you please try to use the approach from the How to create a patch that runs a custom action? article and see if the behaviour still persist?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sashag
Posts: 5
Joined: Mon Oct 05, 2015 9:11 pm

Re: Problem with uninstall process

I performed all steps from this guide but I continue to get this error during msp running.

Your assistance will be appreciated. thank you.
sashag
Posts: 5
Joined: Mon Oct 05, 2015 9:11 pm

Re: Problem with uninstall process

Hi Dan,

I would like to update you that I successfully executed the custom action in order to stop my windows service during the patch running (msp file). I didn't get this error message and patch installation run in good manner. But I still have a problem.
After the patch running as a last action I must start my windows service again. I tried to perform it with the custom action in the same way as I stopped my windows service, but it's not working.

Thank you for your assistance.
sashag
Posts: 5
Joined: Mon Oct 05, 2015 9:11 pm

Re: Problem with uninstall process

I solved all previous issues and patch is working and updates all relevant files and windows service is up and running at end of the patch.
I'm using automatic updates in order to update my software.

I get error in automatic updater that patch is failed please see log below but patch is successfully completed :

MSI (s) (7C:10) [14:13:09:141]: Product: xxxxx - Update xxxxx 1.0.1' installed successfully.

MSI (s) (7C:10) [14:13:09:141]: Windows Installer installed an update. Product Name: xxxxx. Product Version: 1.0.1. Product Language: 1033. Manufacturer: xxxxx. Update Name: xxxxx 1.0.1. Installation success or error status: 0.

MSI (s) (7C:10) [14:13:09:141]: Note: 1: 1728
MSI (s) (7C:10) [14:13:09:141]: Product: xxxxx -- Configuration completed successfully.

MSI (s) (7C:10) [14:13:09:142]: Windows Installer reconfigured the product. Product Name: xxxxx. Product Version: 1.0.1. Product Language: 1033. Manufacturer: xxxxx. Reconfiguration success or error status: 0.

MSI (s) (7C:10) [14:13:09:142]: Attempting to delete file C:\Windows\Installer\209c78.msp
MSI (s) (7C:10) [14:13:09:146]: Deferring clean up of packages/files, if any exist
MSI (s) (7C:10) [14:13:09:146]: Attempting to delete file C:\Windows\Installer\209c78.msp
MSI (s) (7C:10) [14:13:09:146]: Unable to delete the file outside of the engine. LastError = 2
MSI (s) (7C:10) [14:13:09:146]: MainEngineThread is returning 0
MSI (s) (7C:C8) [14:13:09:149]: RESTART MANAGER: Session closed.
MSI (s) (7C:C8) [14:13:09:149]: No System Restore sequence number for this installation.
=== Logging stopped: 10/7/2015 14:13:09 ===
MSI (s) (7C:C8) [14:13:09:154]: User policy value 'DisableRollback' is 0
MSI (s) (7C:C8) [14:13:09:154]: Machine policy value 'DisableRollback' is 0
MSI (s) (7C:C8) [14:13:09:154]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (7C:C8) [14:13:09:154]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (7C:C8) [14:13:09:158]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (7C:C8) [14:13:09:158]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (7C:C8) [14:13:09:159]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (7C:C8) [14:13:09:159]: Post-install cleanup: removing installer file 'C:\Windows\Installer\209c78.msp'
MSI (s) (7C:C8) [14:13:09:160]: Destroying RemoteAPI object.
MSI (s) (7C:D4) [14:13:09:160]: Custom Action Manager thread ending.
MSI (c) (98:BC) [14:13:09:163]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (98:BC) [14:13:09:165]: MainEngineThread is returning 0
=== Verbose logging stopped: 10/7/2015 14:13:09 ===

Please assist.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem with uninstall process

Hi,

This may happen if the detection criteria is not set correctly in the "Updates Configuration" project. For more details you can read the Why do I receive the "Some of the updates failed to install properly" message FAQ.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”