jeffg22
Posts: 13
Joined: Thu Oct 28, 2004 5:34 pm

Install Delay and Uninstall Custom Action

Hi -

I'm using Advanced Installer (AI) to create an install program for my VB.NET application, and I have run into a couple of problems:

1. When I run the install created by AI, there is a very long delay before the Welcome dialog is displayed. If I do not have Silent install of prerequisites checked, then the delay is about 20 seconds between clicking the Finish button on the Prerequisites dialog and display of the Welcome dialog. Checking Silent install of prerequisites doesn't help; there is a delay of about 30 seconds between launching the install and display of the Welcome dialog. During the 20-30 second delay, nothing is on the screen, and the user is left to wonder whether anything is happening.

How can I eliminate this intolerable delay??

2. I can't get an executable custom action to run in the Uninstall. I have a small executable that I'm trying to have run when my product is uninstalled. The custom action pointing to the executable is in the Uninstall folder on the Custom Actions screen. I've tried putting that executable in the TARGETDIR or in the Windows SystemFolder. In both cases, it seems that the executable gets deleted by the uninstall before my custom action is triggered. In the custom action, I've checked 'Synchronous execution, ignore return code.'

If I manually run another copy of the executable after the uninstall is complete, it runs fine.

How can I get an executable custom action to run in the Uninstall?

Please help.

- Jeff
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

1. After the Finish button is pressed setup extracts the MSI and the cab (if they are inside the setup.exe) and launches the MSI. If these files are very large and the system performance is very low then this can take long time. Try put the MSI and cabs outside the Exe and check the time. Sometimes even Windows Installer takes a while to start.

2. How do you determine that the custom action was not triggered since its return code is ignored ? The files are removed AFTER the uninstall custom action are executed.

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jeffg22
Posts: 13
Joined: Thu Oct 28, 2004 5:34 pm

Thanks Cata -

1. Removing the msi and cab files from the exe significantly sped up display of the Welcome dialog; thanks. Unfortunately, I'll have to distribute 3 files in a self-extracting zip, which requires an extra step from the user. In an 'ideal world', the AI exe file would contain tyhe msi and cab files and something (like a small Loading... dialog?) would appear immediately to tell the user that something constructive is happening. Is that possible??

2. I was wrong.

It seems that the problem is not that the file is deleted before it can be executed. Instead, I think the problem may be related to my trying to run an uninstall from an uninstall. Although I don't think that the problem is specific to AI, I hope you can help.

I'm trying to run an uninstall (msiexec /x {productcode}) of a product not installed by my install when my product is uninstalled. Here's why -

- I need to install an instance of MSDE for my app's database, and remove that instance when my app is uninstalled.

- MSDE has its own installer, invoked by the MSDE setup executable.

- As described in earlier posts, I have not been able to run that setup as part of my app's install. (MS no longer distributes merge modules for MSDE.)

- Instead, I install MSDE from my app, the first time my app is run.

The above runs successfully, but how can I uninstall MSDE (by running msiexec /x {productcode}) when my app is uninstalled?? Apparently, running msiexec as a CA doesn't succeed.

I don't know whether this is significant, but I've found that the problem only occurs on XP-family operating systems. On others, the msiexec CA runs successfully when my app is uninstalled. I've tested on the following operating systems:

Windows 2000 (Uninstall CA Succeeds)
Windows Server 2003 (Uninstall CA Succeeds)
Windows XP Pro With SP2 (Uninstall CA Fails)
Windows XP Pro without SP2 (Uninstall CA Fails)
Windows XP Home (Uninstall CA Fails)

Do you have any idea why this happens? Is there any way I can have a small executable run _after_ the uninstall of my app has completed? Can you suggest a way to overcome or work around the problem?

Thanks for your help.

- Jeff
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Hi Jeff,

1) Yes, and it will be added in a future version.

2) It might be the problem with WI not being reentrant... I am afraid I don't have a solution for this one...

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”