Uninstall Warning - Advanced Installer Community
FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Uninstall Warning

When the users are uninstalling they are getting:
"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" (ok/Cancel)

My application is running a service + an potentially an exe, so I have the service listed to stop (in uninstall) in the services section of AI and i have added a "CloseApplication" as a custom action to kill the exe, and these work, but they still get the message

I dont think that the message should be displayed, since the uninstall stops the exe and service, and that releases the lock on the files that are to be uninstalled

There is no message at the end of install to tell them to reboot, does that mean AI have changed its mind about the reboot?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Uninstall Warning

Hello Fergus,
I dont think that the message should be displayed, since the uninstall stops the exe and service, and that releases the lock on the files that are to be uninstalled
That message is displayed at the beginning of the uninstallation, so scheduling the custom action I'm not sure will suffice.
You could create and launch a .BAT that closes your application, waits for it to close and then launches the installer. The .BAT can even auto-delete it self in the end with the right command.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Re: Uninstall Warning

I have a similar issue and was wondering how I would go about starting the batch file before before the installer runs. It needs to stop and remove a service. And if they cancel the install I would also need to recreate the service. All this would need admin privileges.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall Warning

Hello,

The standard action that spawns that message is the "InstallValidate" standard action, which is part of the "Preparing" action group (under "Install Execution Stage").

With that being said, if you have a .BAT file which stops your service, then the custom action that launches that .BAT file should be placed before the "Preparing" action group in "Install Execution Stage" and the setup should have administrator rights so the custom action can have enough privileges to stop the service properly.

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ruck64
Posts: 57
Joined: Wed Jul 24, 2019 8:46 pm

Re: Uninstall Warning

Thank you. And ya I will let you know if I have further issues with this. I still am resolving an issue with the installer. But its something on my end. Appreciate it
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall Warning

You are always welcome.

Glad to help.

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

Return to “Common Problems”