Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • Last Modified:

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

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
sadlermd
Asked:
sadlermd
  • 8
  • 7
1 Solution
 
Vadim RappCommented:
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
 
sadlermdAuthor Commented:
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
 
Vadim RappCommented:
#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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
sadlermdAuthor Commented:
I will check that registry setting today, thanks
0
 
sadlermdAuthor Commented:
here is the uninstall string:

MsiExec.exe /X{7BF23DB1-FE16-48FB-904F-CAC774C9122B}
0
 
Vadim RappCommented:
Did you enable detailed installer logging? http://support2.microsoft.com/kb/223300
0
 
sadlermdAuthor Commented:
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
 
Vadim RappCommented:
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
 
sadlermdAuthor Commented:
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
 
Vadim RappCommented:
"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
 
sadlermdAuthor Commented:
i will try this, thanks...
0
 
sadlermdAuthor Commented:
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
 
Vadim RappCommented:
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
 
Vadim RappCommented:
...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
 
Vadim RappCommented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 8
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now