Solved

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

Posted on 2014-09-19
15
526 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
Comment Utility
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
Comment Utility
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
Comment Utility
#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
 

Author Comment

by:sadlermd
Comment Utility
I will check that registry setting today, thanks
0
 

Author Comment

by:sadlermd
Comment Utility
here is the uninstall string:

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

Expert Comment

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

Author Comment

by:sadlermd
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
"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
Comment Utility
i will try this, thanks...
0
 

Author Comment

by:sadlermd
Comment Utility
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
Comment Utility
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
Comment Utility
...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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Among others, I monitor the Windows Installer zone and Installer zone. I find that many of the questions could be answered much more quickly if a Windows Installer verbose log were submitted with the question.   However, I do not always have t…
I have been scripting applications way too long and can never remember how to create an ISS file.  So I decided to write this article to act as my own knowledge base for future reference, and hope you will also benefit. An ISS file is a response …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now