Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

REMOVE Button not responding in Add/Remove Program


11 replies to this topic

rjprasadch

rjprasadch
  • Full Members
  • 20 posts

Posted 27 August 2008 - 15:07

Hi,

We have converted Installshield 6.3 Project to Installshield v12. It is Installscript project.

I have one problem in one scenario. First I have installed the new setup which is created with IS 12, then I have installed the setup which is created in IS 6.3.

Installation is working fine, but the problem is with Uninstallation. When I click on the REMOVE ICON in the Add/Remove Programs for uninstallation, it is not responding and it is not showing any message. But, when I click on the CHANGE button
it is uninstalling the application.

I am not sure what is causing the problem here. I am using the same GUID that is used for IS 6.3 in IS 12 Version.

Do you have any ideas or suggestions to fix this issue or i have to make any changes in the settings of the Project.

Thanks for your help.



Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 27 August 2008 - 16:10

I'm still using IS6 and therefore haven't actually converted/updated any projects to a later version.

However, if you wish for the two installations to peacefully co-exist, then you probably should change the project GUID instead of leaving it the same.
user posted image

rjprasadch

rjprasadch
  • Full Members
  • 20 posts

Posted 27 August 2008 - 16:27

QUOTE (Taco Bell @ 2008-08-27 16:10)
I'm still using IS6 and therefore haven't actually converted/updated any projects to a later version.

However, if you wish for the two installations to peacefully co-exist, then you probably should change the project GUID instead of leaving it the same.

Thanks for the Information. But two installations will not co exist. As per the requirement, when i install the new setup it should overwrite the old installation.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 28 August 2008 - 14:49

Well you originally asked about the reverse scenario which is installing the old setup after the new one (hence them co-existing) and then supporting the old one's uninstaller. To achive that, you should the project GUIDs.

You can also still have your new setup overwrite the old one by having it uninstall the old one on-the-fly.
user posted image

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 09 September 2008 - 16:59

I'm surprized that you have separate Change and Remove buttons. I thought these were (by default) only available for MSI based setups, while non-MSI setups have a combined Modify/Remove button.

rjprasadch

rjprasadch
  • Full Members
  • 20 posts

Posted 09 September 2008 - 22:08

QUOTE (Stefan Krueger @ 2008-09-09 16:59)
I'm surprized that you have separate Change and Remove buttons. I thought these were (by default) only available for MSI based setups, while non-MSI setups have a combined Modify/Remove button.

Hi,

Thanks for your reply. I tried with combined button also but when i used combined button i am not able to uninstall the application. When i use separate buttons for change and remove, and when i click on the change button application is uninstalling, but when i click on the Remove it is not responding.

I am not sure what is causing the problem. Could you please let me know what happens when we click on the Remove button, can we debug the code and how to trap that click event so that i can isolate the problem.

Thanks for your help in advance,





Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 September 2008 - 22:15

Take a look in the registry under HKLM\Software\Microsoft\Windows\Cureent Version\Uninstall\{your setup's GUID}. You should see the uninstall command line there.

Ozone

Ozone
  • Full Members
  • 77 posts

Posted 11 November 2008 - 22:04

I have also discovered that my InstallScript based installer is not creating the uninstall registry entry. And will not uninstall because the 'uninstall' argument is not being passed to the script.

My scripts were initially created in IS 6, then upgraded to DevStudio 9, and now ungraded to IS 15 SP2.

The very first line of the script is:
// Set the un-install string.
UNINSTALL_STRING = UNINSTALL_STRING + "Uninstall";

Then we check:
if (CMDLINE = "Uninstall") then
the uninstall code goes here.

Yet when this project is installed, the registry entry is not created.

I checked that the \General Information\Add or Remove Programs\Disable Remove Button setting is = NO.

This exact same script has been in production for 8.5 years in IS6 and IS9, but no longer uninstalls in IS15 SP2. This script has been battle tested.

If I find the solution, I will post it here. And as always, I welcome anyone who can post a solution sooner.







Ozone

Ozone
  • Full Members
  • 77 posts

Posted 12 November 2008 - 22:53

Update: The uninstall registry entry is being created in the HKEY_CURRENT_USER section of the registry instead of the HKEY_LOCAL_MACHINE section. Windows Add\Remove programs obviously looks for the entry in HKEY_LOCAL_MACHINE.

My code used InstallationInfo, and I have tried the newer CreateInstallationInfo without any change in results. The above call must come before the MaintenenceStart function. It is in MaintenanceStart that the uninstallation registry entry is created.

I thought that I could just add the registry entry by entering the values in \System Configuration\registry in the InstallShield UI. But the path would be different for Vista than it is in older OS's. In older OS's, the path was "\Program Files\InstallShield Installation Information\{Your GUID here}\setep.exe". In asta la Vista it is in "\Users\theuser\AppData\Roaming\InstallShield Installation Information\{Your GUID here}\setup.exe".

So it looks like I will have to prototype the appropriate windows API and create the registry key with the appropriate value based on the OS. Unless Accresso fixes this 'problem'.

So why did my company spend thousands of dollars on the install package when I have to do all this coding?

Plan "B' will be to go back to using Dev Studio 9.

ph34r.gif


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 13 November 2008 - 11:48

Try setting ALLUSERS=TRUE early in your script.

Ozone

Ozone
  • Full Members
  • 77 posts

Posted 17 November 2008 - 16:41

Stefan,

I made the changes to the script and there is no change in the install behavior.
The install still creates registry entries in HKEY_CURRENT_USER. I have created other new install (pure installscript) projects in version 15 and they uninstall perfectly.

I am going to test creating this project from scratch and see if that helps. I suspect that opening the project created in the older version of IS with the new IS version 15 might be causing the problem.



Ozone

Ozone
  • Full Members
  • 77 posts

Posted 19 November 2008 - 15:19

Problem found and solved. This new version 15 of InstallShield is adding extra arguments to the UNINSTALL_STRING. My script is looking for the argument 'uninstall' that I added in the original script. InstallShield was adding two extra arguments so when the UNINSTALL_STRING was written to the registry, these extra arguments were in front of the 'uninstall' argument I added. My code never saw my uninstall argument. So I added this code to create my value for the uninstall string and then modify the InstallShield entry after the call to MaintenanceStart();.

The second chagnes are that I added the two lines of code into the function that installs the media. In the older code this was done in the 1st function in the script and worked in the older version 9, but not in version 15. The code was OK, but was not in the right place for the new version.


CODE
// Set the root key.
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
   
// Default setting
ALLUSERS = TRUE;

// Set the un-install string.
ParsePath ( svUNINSTALL , UNINSTALL_STRING , PATH );
LongPathToQuote ( svUNINSTALL , FALSE );  // Strip off double quotes
svUNINSTALL = svUNINSTALL ^ "setup.exe";
LongPathToQuote ( svUNINSTALL , TRUE );   // Put double quote back on
UNINSTALL_STRING = svUNINSTALL + " uninstall";  // argument to uninstall
   
// Create the application information key.
InstallationInfo(szCompany, szProduct, szVersion, szProductKey);
   
// Set LOGO Compliance Application Path
RegDBSetItem(REGDB_APPPATH_DEFAULT, szAppPath ^ @IFX_PRODUCT_KEY);
RegDBSetItem(REGDB_APPPATH, szAppPath);
       
// Create the application uninstallation key
// and initialize the uninstall log file.
MaintenanceStart();    
   
// Overwrite InstallShield entry created in MaintenanceStart()
RegDBSetItem(REGDB_UNINSTALL_STRING,UNINSTALL_STRING);