arnaud.humilier
Posts: 12
Joined: Wed May 19, 2010 10:19 am

Change registry key and Restart uninstaller after reboot

Hello guys,

I'm looking for a complete process while uninstalling my software. Hoping someone will be able to help me.

On uninstall, I would like:
  • To Check a registry key (example "HKEY_LOCAL_MACHINE\SOFTWARE\CheckMeBeforeUninstall").
  • Depending on the value, to modify another registry key (example "HKEY_LOCAL_MACHINE\SOFTWARE\ChangeMeBeforeUninstall") and after that force a restart of the computer.
  • Then, to restart automatically the uninstaller after the reboot. Maybe using the RunOnce registry key ?
To give a short idea of the need, I'm working on a custom Gina. When uninstalling my software, I need to reboot the computer without my Gina before uninstalling all components.
Does anyone know how to do that ?

Many thanks,
Arnaud.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Change registry key and Restart uninstaller after reboot

Hello,
To Check a registry key (example "HKEY_LOCAL_MACHINE\SOFTWARE\CheckMeBeforeUninstall").
Use a registry search to retrieve the value of that registry key. It will be stored in a property.
Depending on the value, to modify another registry key (example "HKEY_LOCAL_MACHINE\SOFTWARE\ChangeMeBeforeUninstall") and after that force a restart of the computer.
Run the "reg" command line utility as a custom action and condition it using the property found at the step before.
Then, to restart automatically the uninstaller after the reboot. Maybe using the RunOnce registry key?
The following post contains a sample project that suspends the install process, forces a reboot then resumes the install process:
http://www.advancedinstaller.com/forums ... 431#p28431

I am not sure what you are referring to as 'Gina'.

Our user guide contains details on the terms I used in my explanation so please feel free to consult it.

Let me know if there's anything else I can assist you with.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
arnaud.humilier
Posts: 12
Joined: Wed May 19, 2010 10:19 am

Re: Change registry key and Restart uninstaller after reboot

Hello Gabriel,

Thanks for your support it was very helpful !

Now I manage all the process but there's just one thing which don't work:

I've used your sample to suspend the install and restart the computer.
But on reboot, when the installer launch, I receive a message "This installation package could not be opened. Verify that the package exists..."

Do you have any idea about that ?

Many thanks,
Arnaud.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Change registry key and Restart uninstaller after reboot

Hi Arnaud,

This message appears because after restart the setup is launched with another current directory and it cannot find the
prerequisites, which were placed to relatives paths.

This fix should have been included in version 7.6.1 from Advanced Installer, can you please try rebuilding the package using this version.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
arnaud.humilier
Posts: 12
Joined: Wed May 19, 2010 10:19 am

Re: Change registry key and Restart uninstaller after reboot

Hello Bogdan,

I'm already using the last version 7.6.1 (build 27951).

Many thanks,
Arnaud.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Change registry key and Restart uninstaller after reboot

Hi Arnaud,

Can you please send us an e-mail to support at advancedinstaller dot com with the aip file you are using to build the package and
a link from were I can download the entire package built by you so we can investigate the behavior you are encountering.

As I said this was a bug which should have been fixed in the last version of Advanced Installer.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”