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

InstallScript issue


5 replies to this topic

AshokGupta

AshokGupta
  • Members
  • 12 posts

Posted 06 January 2006 - 13:36

Hi,
I have 2 features which i am installing silently based on some conditions.
I want to have a separate entry for these features in add/remove programs, so that i can uninstall them separatly.

Please help.

Thanks

Edited by AshokGupta, 06 January 2006 - 13:37.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 January 2006 - 14:08

Then you should split your project into two setups. Otherwise users should click the Modify button and select which feature they want to uninstall in the feature tree dialog.
As a workaround you could have your script generate an additional uninstall registry entry which would call your setup (basically in the same way as the automatically generated entry) but specifies a custom command line parameter which tells your setup to uninstall only that one feature.

AshokGupta

AshokGupta
  • Members
  • 12 posts

Posted 09 January 2006 - 06:23

Thanks for your response. I understood your suggestion but don't know how it will help. I cannot split the setup now as i am at the end of the development.

Here is what i did as per your work around suggestion.

1) I created UNINSTALLKEY when i run a setup first time.
2) It creates a correct entry in add/remove programs.
3) But it doesn't uninstall the installed feature.

code:
========

IFX_PRODUCT_NAME = "PRODUCT1";
IFX_PRODUCT_KEY = "APP";
UNINSTALLKEY = "APP1";
// Create the application information key and provide
// information to create the per application paths key.
InstallationInfo(IFX_COMPANY_NAME, IFX_PRODUCT_NAME, @PRODUCT_VERSION, IFX_PRODUCT_KEY );
SdProductName ( IFX_PRODUCT_NAME);
nResult = DeinstallStart( svTarget, svLogFile, IFX_PRODUCT_KEY, 0 );

FeatureSetTarget(MEDIA,"<FOLDER>",TARGETDIR);
FeatureSelectItem(MEDIA, "NEWFEATURE", TRUE);
FeatureMoveData(MEDIA,nvDisk,0);

szReferenceFile = svTarget ^ IFX_PRODUCT_KEY; // TO DO : If your file is in a
// subfolder of svDir add that here
DeinstallSetReference( szReferenceFile );



Edited by AshokGupta, 09 January 2006 - 14:48.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 January 2006 - 14:32

If you want to remove a feature you need to un-select it, using FeatureSelectItem with FALSE

AshokGupta

AshokGupta
  • Members
  • 12 posts

Posted 13 January 2006 - 11:45

Can you tell me how can i implement your suggestion mentioned below?

As a workaround you could have your script generate an additional uninstall registry entry which would call your setup (basically in the same way as the automatically generated entry) but specifies a custom command line parameter which tells your setup to uninstall only that one feature.

Thanks

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 16 January 2006 - 12:06

In your script you can call:
FeatureSelectItem(MEDIA, "FEATURE_YOU_WANT_TO_REMOVE", FALSE);