Faulty uninstaller - Advanced Installer Community
rossj
Posts: 16
Joined: Sun Jul 03, 2011 10:07 am

Faulty uninstaller

Hello,

The installer for our product contains a custom action (RemoveReadOnlyAttribute.CA.dll) to remove a read only attribute from a desktop shortcut during uninstall. The problem is that on some computers, the custom action can't be run because it was built by a runtime newer than the one available during the uninstall (and so the uninstall is aborted). This prevents me from uninstalling or upgrading our software. Even if I remove the custom action from a new installer, it's the old one that is run to remove the previous version.

Although I wan't to fix the root cause of my problem (the custom action), a more pressing problem is how to upgrade the version of our software on a customer's computer that is experiencing this problem. I am a little limited due to not being able to reproduce the problem on my computer (not that I really want to without knowing how to fix it!).

I have seen the forum post http://www.advancedinstaller.com/forums ... f=2&t=4959, which upgrades the installation using a new installer (same product code) with the msiexec options REINSTALL=ALL REINSTALLMODE=vomus". Unfortunately, running the installer with these options results in the installer running for a bit then aborting with the error "the specified account already exists".

I have also seen programs like Microsoft's "Fix problems that programs cannot be installed or uninstalled ", and third party software like Repo Uninstaller. But I'm not keen to recommend them to my customer without having seen it run and fix the problem.

Is there way to get this uninstalled? Can I somehow replace the cached uninstaller that windows has kept from the install? I've seen the C:\Windows\Installers directory, but I'm worried if I start messing there I'll only make things worse.

My software is a Java JAR packaged as an exe, and installs a couple of executables and a windows service. It was built using AI 11.7 and I'm currently using 12.0. I don't know what version of windows the customer has installed our software on, but the install log shows "SFXCA: Binding to CLR version v2.0.50727" (just before failing to load the custom action). I'm guessing our custom action is built for .NET 4.

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

Re: Faulty uninstaller

Hi Ross,

We have an FAQ article for removing broken installations, I'm not sure you've seen it. Every method from this article has been tested and can be reliable.

If you want to address this issue completely, I recommend you get in touch with your customer and have him help you with details about the environment and clear step by step test cases. If you are not able to replicate the problem on your own test machines, you won't be able to find the best solution.
Unfortunately, running the installer with these options results in the installer running for a bit then aborting with the error "the specified account already exists".
To fix this you could try using the same MSI names in both of your project versions(old and new) but I'm not sure it will work in your case.

Hope this helps,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rossj
Posts: 16
Joined: Sun Jul 03, 2011 10:07 am

Re: Faulty uninstaller

Thanks Mihai. Somhow I missed checking the FAQ this time around (although I have looked at it before).

I have tried the /fv approach on my machine, and although I can't reproduce the custom action problem, I can confirm from the uninstall log that no attempt to run the curstom action occurred during the uninstall. So I'll use this strategy with our customer.

One question though... I use the EXE with embedded resources (and Pack200) output format. I wasn't able to make the /fv option work without first rebuilding the project as an MSI (which can't use Pack200) and running msiexec explicitly. Is there a way to do this with an EXE as the source to be recached?

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

Re: Faulty uninstaller

Hi Ross,
Is there a way to do this with an EXE as the source to be recached?
Working with the MSI inside the EXE is described in the EXE setup file article. Also, you can use something like:

Code: Select all

YourPackage.exe /extract:"C:\Your work"
This command will extract "YourPackage.msi" file in "Your work" folder.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rossj
Posts: 16
Joined: Sun Jul 03, 2011 10:07 am

Re: Faulty uninstaller

Thanks again.

Our problem is solved on the customer's machine. Strangely they got the "specified account already exists" error when running msiexec /fv, which I didn't get on my machine (although I saw it while trying a different fix).
In the end the customer upgraded .NET to 4.5 (I think 4.0 was the minimum required), and the original uninstaller worked.

/Ross

Return to “Common Problems”