PDA

View Full Version : Uninstall without Cancel Button



brunzefb
11-21-2005, 10:41 AM
Hi,

I wanted to uninstall our product but disable the cancel button. Found this good article that shows how to do this (http://www.installshield.com/news/newsletter/0409-articles/disable.asp?CSAL0904=%3CATT:Email_ID%3E), but there are some problems.

Launching MsiExec.exe /X{PRDUCT_GUID} /qb! from a CMD.EXE window does exactly what I want: hide the cancel button. Then I thought, just modify HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PRODUCT_GUID\UninstallString, add the "/qb!" and you're done.

Somehow, this approach does not work - we used REGMON to see if UninstallString is ever used, and it does not seem to be (monitored runDLL.exe, then launched Add Remove Programs and then the uninstall of the app).

I also tried the VBScript custom action, which does execute (checked the MSI LOG files), but does not seem to disable the button.

Friedrich

RobertDickau
11-21-2005, 10:49 AM
Where in the sequences do you have the VBScript custom action scheduled? But no, Windows Installer doesn't seem to use the UninstallString value from the registry...

brunzefb
11-22-2005, 09:14 AM
I put the VBScript custom action into the Execute sequence after InstallValidate.

Friedrich

RobertDickau
11-22-2005, 10:30 AM
Hmmm... Is there a condition attached to the action? As a test, does the action work if you remove the condition?

brunzefb
11-23-2005, 10:02 AM
OK, I had another go at the problem. I redid the script, specifying it to read from a .vbs file instead of including the script with the custom action.

Friedrich