Uninstall/upgrade consistently prompting for restart - Advanced Installer Community
nafujbeck
Posts: 8
Joined: Wed Apr 26, 2017 11:47 pm

Uninstall/upgrade consistently prompting for restart

Hello,
I've been using the Advanced Installer for years, and currently use version 15.5.1 for building the installer for my app.
I am now consistently getting a prompt to restart my computer if I install the app and then uninstall it. I turned on verbose logging, and the updater.exe is not able to be deleted by the uninstaller, and is causing a reboot to be scheduled. Here are the relevant events from the log file:

...
MSI (s) (A4:DC) [16:33:20:353]: Executing op: SetTargetFolder(Folder=C:\Program Files (x86)\xxxx\My App Client\)
MSI (s) (A4:DC) [16:33:20:353]: Executing op: FileRemove(,FileName=MyAppUpdater.exe,,ComponentId={E445CAEF-DAC5-4ABB-9C25-B6250D622930})
MSI (s) (A4:DC) [16:33:20:356]: Verifying accessibility of file: MyAppUpdater.exe
MSI (s) (A4:DC) [16:33:20:356]: Verifying accessibility of file: MyAppUpdater.exe
MSI (s) (A4:DC) [16:33:20:357]: Using source file security for destination.
MSI (s) (A4:DC) [16:33:20:357]: Note: 1: 2318 2: C:\Config.Msi\32ff0.rbf
MSI (s) (A4:DC) [16:33:20:360]: Note: 1: 2329 2: 32 3: C:\Program Files (x86)\xxx\My App Client\MyAppUpdater.exe
MSI (s) (A4:DC) [16:33:20:360]: Verifying accessibility of file: MyAppUpdater.exe
MSI (s) (A4:DC) [16:33:20:367]: Note: 1: 2318 2:
MSI (s) (A4:DC) [16:33:20:372]: Note: 1: 2318 2:
MSI (s) (A4:DC) [16:33:20:372]: Executing op: SetTargetFolder(Folder=C:\Program Files (x86)\xxx\My App Client\Utilities\)
MSI (s) (A4:DC) [16:33:20:372]: Executing op: FileRemove(,FileName=winsat_runtest.exe,,ComponentId={19CC5CAC-97D7-4E49-8FCF-B464A3A025DC})
Info 1903. Scheduling reboot operation: Deleting file C:\Program Files (x86)\xxx\My App Client\MyAppUpdater.exe. Must reboot to complete operation.
MSI (s) (A4:DC) [16:33:20:375]: Verifying accessibility of file: winsat_runtest.exe
MSI (s) (A4:DC) [16:33:20:380]: Note: 1: 2318 2:
MSI (s) (A4:DC) [16:33:20:388]: Note: 1: 2318 2:
MSI (s) (A4:DC) [16:33:20:391]: Executing op: SetTargetFolder(Folder=C:\Program Files (x86)\xxx\My App Client\)
...

Do you have any insight into why there seems to be a lock on the updater.exe file? I can provide the aip file, but would rather do that privately.

Thanks,
Nathan
nafujbeck
Posts: 8
Joined: Wed Apr 26, 2017 11:47 pm

Re: Uninstall/upgrade consistently prompting for restart

Hello,
I did some more digging on this, and when I run the uninstaller, it is kicking off the updater.exe service! I see the updater.exe service appear as running in Task Manager during the install process. Why is that happening?

I am considering just adding a custom action before the actual removal to delete this service, but this seems like a hack and I don't understand why the updater service is getting started up on an uninstall. It is not set to start on an uninstall:
ServicesSettings.png
ServicesSettings.png (40.78 KiB) Viewed 4993 times
Thanks,
Nathan
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall/upgrade consistently prompting for restart

Hello Nathan,

Thank you for the explanation.

Unfortunately, I can not say for sure why this happens. I have run few tests on my machine and everything is working as expected during the uninstall process.

In order for me to further investigate this, could you please forward me the following:

- a copy of your .AIP file

- a download link for the setup built with the above .AIP file

by e-mail at support at advancedinstaller dot com?

My guess here would be the fact that your service is actually running during the time you are performing the uninstall. Could you please check that within services.msc and let me know if that is the case? If that is indeed the case, this might happen if your setup does not have enough privileges to stop the service.

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nafujbeck
Posts: 8
Joined: Wed Apr 26, 2017 11:47 pm

Re: Uninstall/upgrade consistently prompting for restart

Hi Catalin,
Thanks for the reply! I have emailed you the AIP file and the MSI separately.

The service is not running when the installer starts. I can watch the Task Manager during the uninstall process, and I do briefly see the process for the updater service start in Task Manager during the uninstall process. This is very strange - I don't know why it would start the updater service during uninstall, but it does appear to do this.

Please let me know if there is anything else you see or notice about how we have the installer configured.

Thanks again,
Nathan
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall/upgrade consistently prompting for restart

Hello Nathan,

First of all, thank you for the provided files.

I have had a look over the sent .AIP file and everything seemed to be configured as expected.

After doing so, I have ran the MSI in a clean virtual machine (Windows 10) and everything worked as expected for me there. Here is what I have done:

Scenario 1:

- installed the application

- checked services.msc ==> the service was stopped

- opened control panel and performed an uninstall from there ==> the product uninstalled correctly with no restart prompt (also, the service was not started during this process)

Scenario 2:

- installed the application

- checked services.msc ==> the service was stopped

- performed the uninstall from the MSI file itself (i.e.: double click on MSI ==> it runs in Maintenance mode ==> select Remove)

- once again, everything worked as expected. The product was correctly uninstalled with no restart prompt (and the service was not started during this process)

Is there something I have missed in my tests? If so, could you please let me know?

Also, have you tried testing this on a clean machine (e.g. a Virtual Machine)? If so, does this reproduce there as well?

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nafujbeck
Posts: 8
Joined: Wed Apr 26, 2017 11:47 pm

Re: Uninstall/upgrade consistently prompting for restart

Hi Catalin,
Thanks for the reply and for the investigation into this. If you are not able to reproduce it, then it seems like it must be something on my system, though I don't know what. I will try running it on a clean virtual machine and see if it works without prompting for a restart.

I don't know what could be causing the restart issue on my machine. It consistently prompts for a restart when manually uninstalling (and, when using the auto-updater, just forces a system restart without warning). But other than the installer log file extract I posted where it says that the updater.exe file couldn't be removed without a system restart, I don't have anything else to go on.

It would be nice to know the root cause, in case this happens for my customers, and not just on my dev machine... But it may just remain a mystery.

Thanks,
Nathan
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall/upgrade consistently prompting for restart

Hello Nathan,

You are always welcome.
I will try running it on a clean virtual machine and see if it works without prompting for a restart.
Sure. Please let me know if you can reproduce this behavior on your Virtual Machine.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”