pay928
Posts: 25
Joined: Thu Dec 02, 2010 11:32 pm

Can't Uninstall Older Product Version

Hello,

Some users are getting a "Network Resource Error" when they try to upgrade versions. This is with exe's that extract to "[AppDataFolder][|Manufacturer]\[|ProductName]\install". It fails and tries to browse to this location to find the older msi. This does not happen if the user installs the older version then immediately installs the newer one. It happens with users that have had the older version installed previously and are trying to use the new installer. It will also make the user unable to install the older version through any means but rerunning the original exe (Control Panel, Uninstall Shortcut, etc. don't work).

Anybody have any ideas on how to try to fix this problem?

Thanks,
Pat
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Can't Uninstall Older Product Version

Hi Pat,

We had a similar discussion in this thread. Are the solutions invalid in the current case?

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pay928
Posts: 25
Joined: Thu Dec 02, 2010 11:32 pm

Re: Can't Uninstall Older Product Version

The only solution for the user is to run the original installer exe, but we would like to avoid that if there is a way for the newer version to be able to still install and remove the older installation. I tried having it install even if the uninstall failed, but this causes issues with the older install still being installed and unwanted behavior when you uninstall the newer version.

Pat
pay928
Posts: 25
Joined: Thu Dec 02, 2010 11:32 pm

Re: Can't Uninstall Older Product Version

I have also emailed the project files for the Older and Newer Version to your support email as well referencing this thread.

Pat
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Can't Uninstall Older Product Version

Hello Pat,

I have looked into your projects and to prevent this issue from happening in the future you will need to use the "Do not delete extracted MSI and CAB files" option in the Media page's Bootstrapper tab. You need to use this option in your old project but also in your new projects as well to ensure this issue won't occur with future upgrades.

Since you already have the old version sent out to your customers, you can try to fix this by doing a MSI re-caching custom action in your new project. Here is a thread that refers to something else but has detailed steps on how to accomplish this.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pay928
Posts: 25
Joined: Thu Dec 02, 2010 11:32 pm

Re: Can't Uninstall Older Product Version

Recaching the MSI does not seem like it will work since it uses the source exe as well. This is a problem since the installer is on a web site and the user may never download it, so it would either get removed by disk cleanup or user may delete it. This causes the method to prompt for where to find the exe (and they can manually uninstall if they have it anyways). This also causes the Recaching project to not uninstall itself and only way to get rid of that is Control Panel. Is there another method to properly recache the msi?

Regards,
Pat
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Can't Uninstall Older Product Version

Hi Pat,

You don't need any resources,only the MSI in order to recache it. You can try to manually recache it from the "cmd.exe" shell using the following command:

Code: Select all

msiexec.exe /fv "<path_to_MSI>"
If it works for your MSI this way then it will work as a custom action as well.

Please test this and let us know on the outcome.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pay928
Posts: 25
Joined: Thu Dec 02, 2010 11:32 pm

Re: Can't Uninstall Older Product Version

I do the following steps:
1. Install old version from exe
2. Delete exe
3. Run msiexec on the msi
4. Get asked to select installation package and a browse dialog to where I ran the exe from

It runs fine if I skip step 2.

Looking at the Windows Installer option choices as well:
v - runs from source and recaches local package

This seems to say that you need the source to recache the local package.

Pat
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Can't Uninstall Older Product Version

Hello Pat,
Get asked to select installation package and a browse dialog to where I ran the exe from
If you have the MSI included in your EXE, when you run your EXE the MSI will be extracted to the Extract Location specified in the Bootstrapper tab of the build from the Media page.
By default the location is:

Code: Select all

[AppDataFolder][|Manufacturer]\[|ProductName]\install
You should browse to this location to the MSI instead of the EXE.
This seems to say that you need the source to recache the local package.
If everything proves to work, you would use a custom action but add the MSI( approximate disk size of 2-300 Kb depending on its contents ) to your package thus the recaching operation performed by the custom action will have access to it.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pay928
Posts: 25
Joined: Thu Dec 02, 2010 11:32 pm

Re: Can't Uninstall Older Product Version

The browse I get does not allow anything but exe's so this does not work. This is also in an effort to recache the MSI for people with the old installer that would not have the MSI in that location since it gets deleted.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Can't Uninstall Older Product Version

Hello Pat,

Here is what you need to do to test what tried to explain so far:
  • install the application using the EXE(make sure you have the "Do not delete extracted MSI and CAB files" option enabled from the Boostrapper tab in the Media page of your current build)
  • get the resolved value of the

    Code: Select all

    [AppDataFolder][|Manufacturer]\[|ProductName]\install
    Extract Location by right clicking on the text field from the Bootstrapper tab -> "Copy Resolved"
  • open a "cmd.exe" shell
  • run the following command:

    Code: Select all

    msiexec.exe /fv "<paste_extract_location>\YourMSI.msi"
This is also in an effort to recache the MSI for people with the old installer that would not have the MSI in that location since it gets deleted.
After acknowledging the above result, you can include your old MSI to be installed along with your new package so that a recaching custom action you will add can have access to it on your users machine.
The browse I get does not allow anything but exe's so this does not work.
I am not sure what you mean by this, can you please explain how are you coming to this result vis a vis the steps above?

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pay928
Posts: 25
Joined: Thu Dec 02, 2010 11:32 pm

Re: Can't Uninstall Older Product Version

mihai.petcu wrote:Hello Pat,

Here is what you need to do to test what tried to explain so far:
  • install the application using the EXE(make sure you have the "Do not delete extracted MSI and CAB files" option enabled from the Boostrapper tab in the Media page of your current build)
  • get the resolved value of the

    Code: Select all

    [AppDataFolder][|Manufacturer]\[|ProductName]\install
    Extract Location by right clicking on the text field from the Bootstrapper tab -> "Copy Resolved"
  • open a "cmd.exe" shell
  • run the following command:

    Code: Select all

    msiexec.exe /fv "<paste_extract_location>\YourMSI.msi"
The part marked in bold is not possible, since the issue I'm trying to resolve is with users with the old installer, so they will not have the new exe application. This means their extracted files will be deleted. If the msi was in the "[AppDataFolder][|Manufacturer]\[|ProductName]\install" location, then it would not crash since it tries to run from there.
The browse I get does not allow anything but exe's so this does not work.
I am not sure what you mean by this, can you please explain how are you coming to this result vis a vis the steps above?

Regards,
Mihai
I am doing the exact steps I stated previously.
I do the following steps:
1. Install old version from exe
2. Delete exe
3. Run msiexec on the msi
4. Get asked to select installation package and a browse dialog to where I ran the exe from
When I leave the exe, it runs fine. The problem is when I remove it (as would happen for users that run from browser without saving then clean out their temporary folders). The screen shot is attached. I am running msiexec from the command prompt as well.
Attachments
Browse.JPG
Browse.JPG (51.28 KiB) Viewed 17096 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Can't Uninstall Older Product Version

Hello Pat,
The part marked in bold is not possible, since the issue I'm trying to resolve is with users with the old installer, so they will not have the new exe application. This means their extracted files will be deleted. If the msi was in the "[AppDataFolder][|Manufacturer]\[|ProductName]\install" location, then it would not crash since it tries to run from there.
You don't need to enable the "Do not delete extracted MSI and CAB files" option in the old installers, just in this test installer. Right now you are trying to recache the old MSI using your new installer.

Again, we are talking about your old installer you want to fix. So, using its project follow the steps from my previous post.
This is for testing purposes so you can see what would happen on the user's machines. In the end you will need to implement this mechanism in your new project.
After following the above, the mechanism would be to include the old MSI from the steps above in your new installer project as a temporary file and run the recache command line as a custom action.

This way you will deliver the new installer containing the old MSI as a temporary file and recache it on the user's machine during the new installation.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pay928
Posts: 25
Joined: Thu Dec 02, 2010 11:32 pm

Re: Can't Uninstall Older Product Version

I don't see how running the msiexec recache custom will be helpful when I can't even get it to work by manually typing it into the command line. It does not recache the MSI at all if I run OldVersion.exe from C:\OldVersion.exe, then proceed to delete that file. All it does when I run msiexec.exe /fv "OldVersion.msi" is try to run it then ask for the C:\OldVersion.exe.

Also in a related problem to this. Is there a way to force the PackageCode to upgrade if I run a reinstall of the same version, but a different package? If this is not possible, is there a setting to cause AI to not change the PackageCode every build? This is with 7.1.3
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Can't Uninstall Older Product Version

Hello,

I have tested the manual "cmd.exe" scenario you posted and it works fine. I am not sure what is wrong in your case. You could try to isolate and test the same scenario with a separate clean project.
If recaching the MSI doesn't work in your case, the only solution for your users is to download the old MSI during the upgrade prompt.
Also in a related problem to this. Is there a way to force the PackageCode to upgrade if I run a reinstall of the same version, but a different package? If this is not possible, is there a setting to cause AI to not change the PackageCode every build? This is with 7.1.3
This approach is not a correct one because it is against the way Windows handles install packages. The PackageCode property is not stored within the .aip project file for good reason, thus it cannot be modified. It is instead generated each time you rebuild your project. For more information about this please read this article from our user guide.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”