Uninstalling a per-user install when installing a per-machin - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

markfc
Posts: 1
Joined: Wed Oct 26, 2011 2:11 pm

Uninstalling a per-user install when installing a per-machin

Hello,

I would like to find out if there is a way to uninstall a per-user installation when upgrading to a per-machine installation?

I have attached the following test files:
    upgradespike_v1.aip ( a per-user msi version 1. Contains file1.txt, file2.txt, file3.txt)
      upgradespike_v2.aip ( a per-machine msi version 1.1 to upgrade to. Contains file2.txt, file3.txt, file4.txt))

      After installation of the 1st msi (per-user) files file1.txt, file2.txt, file3.txt exist in the installation.
      After upgrade of the 2nd msi (per-machine) files file1.txt, file2.txt, file3.txt and file4.txt exist in the installation.
      It seems like the upgrade has merged the installation instead of removing the 1st installation.
      What I would like after the upgrade is file2.txt, file3.txt, file4.txt only to exist but the original installation is not being removed.

      Is there anyway to achieve this? Perhaps with a custom action?
      Attachments
      upgradespike_v2.aip
      (6.83 KiB) Downloaded 217 times
      upgradespike_v1.aip
      (6.67 KiB) Downloaded 176 times
      Bogdan
      Posts: 2796
      Joined: Tue Jul 07, 2009 7:34 am
      Contact: Website

      Re: Uninstalling a per-user install when installing a per-ma

      Hi,

      This operation is not performed automatically by Windows Installer because the install type is different between the two versions.

      You can try to use a custom action in the InstallUISequence of the second version that will trigger a silent uninstall for the old version,
      using its product code, only if it is found on the machine.

      To detect the old version you can use a search after its product code, from Search page.

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

      Return to “Common Problems”