Solved

InstallShield 2009 Premier: Uninstall Custom Action Not Called From Add\Remove Program

Posted on 2014-09-19
15
548 Views
Last Modified: 2014-09-29
OS: Windows 7 Ultimate SP1
BasicMSI

When i uninstall the package from the Uninstall option in Add\Remove Programs, my custom action is never called.

Install Exec Sequence: After InstallInitialize
Install Exec Condition: REMOVE="ALL"



thanks,

rick
0
Comment
Question by:sadlermd
  • 8
  • 7
15 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40336633
What you posted is correct. So here's what I would do:

1. produce detailed log and inspect. Will you see your custom action with "skipped because condition is not met"? Could it be that it's in fact called, but does not work as you expect?
2. if you see that it's skipped, then check if REMOVE indeed has value ALL.
3. Create new vanilla installation that installs something trivial, such as one registry entry, put custom action like yours, and see if it's called. In fact we did just that, and it worked.

4. Put CA after InstallValidate (per http://www.installshield.com/news/newsletter/0212-articles/msiconditions.asp)
0
 

Author Comment

by:sadlermd
ID: 40347010
1. Our setup creates a log file with no problem on install; however, when we run Uninstall from Add\Remove program, no log is generated.

2. ...

3. TODO

4. That page is where we started; we followed the instructions on that web site but to no avail.

For now, to work around this problem, we modified the install process to remove the content that was not removed during the uninstall...
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40347043
#1: check Uninstall string in the registry, under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall . Maybe it has /q switch. If it does, then remove it. If you can, post the uninstall string here as well.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:sadlermd
ID: 40350298
I will check that registry setting today, thanks
0
 

Author Comment

by:sadlermd
ID: 40350342
here is the uninstall string:

MsiExec.exe /X{7BF23DB1-FE16-48FB-904F-CAC774C9122B}
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40350346
Did you enable detailed installer logging? http://support2.microsoft.com/kb/223300
0
 

Author Comment

by:sadlermd
ID: 40350503
after enabling the installer logging, i see Error 1721:

"There is a problem with this Windows Installer package. A program required for this install to complete could not be run."
0
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
ID: 40350513
Which means that it in fact tried to run the CA, but CA failed.

If CA itself would show an error message, it would be in the log following the line you posted. Depends on the CA itself.
0
 

Author Comment

by:sadlermd
ID: 40350584
the CA is an executable that is not installed with the package.

This now turns my original question into a 2 part issue.

The first issue you have solved since we have identified what happened - your guidance can be accepted as the solution.

The second issue is how do i define the EXE as a custom action that can take a command line parameter (/uninstall=true)?

It seems like the "Custom Action->New EXE->Stored in Binary Table" is the way to go but i'm not familiar with how to implement it.

thanks for your help!
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40350619
"Stored in binary table" is for an executable that will be internally stored within the installation. During the installation it will be extracted into temporary directory on the target machine, launched, and then deleted. If this is what you want, then you add custom action, then click "executable filename", select 'browse for file", and upload your executable.
screenshot 1Then in command line you specify your parameter:
screenshot 2But if you in fact want to run an executable that already exists on the target machine, then it's totally different story.
0
 

Author Comment

by:sadlermd
ID: 40350669
i will try this, thanks...
0
 

Author Comment

by:sadlermd
ID: 40350683
one more question:

What if the executable has a configuration file (i am using a .NET console application) - what do you need to do to account for that file?
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40350698
No good way exists. .Net console app should be able to run without config. If it's really necessary, well, maybe a self-extracting zip or rar that would then launch the application...
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40350707
...yet another way is to actually install it along with the application. You can then delete it in the very end, using another deferred custom action,  if it's really necessary not to leave it behind, although it's unlikely that the users would notice it's there if they don't know to look for it to begin with.
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40350936
Follow-up comment: apparently the message "A program required for this install to complete could not be run." in Installer log is somewhat misleading: Installer writes it when it in fact could and did run the the script or executable being the CA, but it has returned an error code.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Easy system snapshot software 8 81
WiX Install Get Value via Dialog and update Config File 1 64
Sound 1 42
VB.NET 2008 Publish Error 2 33
One of the frequent problems with the installations is when some file or registry entry is not removed from the system upon un-installation of the product. Clean removal is always highly desirable. One major reason for that is badly authored inst…
One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question