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

Uninstall


4 replies to this topic

Aignerma

Aignerma
  • Members
  • 4 posts

Posted 18 December 2002 - 14:57

Hello,

I've following problem:

I install the basic product. After this I install an AddOn.

If I uninstall the AddOn there are some files of the basic product on the system. I want, that both (AddOn and Basic product) are uninstallt.

How can I do this?
Can I write a uninstall script for the AddOn which calls the uninstallscript of the basic product?
Have anybody a better idea?

Best Regards,

Markus

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 18 December 2002 - 17:28

Yeah, basically change the default OnMainUIBefore behavior for the addon to also call the uninstall for the previously existing basic product.

The command can be found at the following registry location:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<ProductGUIDforBasicInstall>UninstallString

The Product GUID can be found by opening the Basic IS project, selecting Project | Settings, and choosing the Application tab.  There you'll find the GUID as the first entry.
user posted image

Aignerma

Aignerma
  • Members
  • 4 posts

Posted 18 December 2002 - 17:57

Hello,

I have added the OnMaintUIBefore function (click to left combobox, choose "Before Move Data". Then click to right combobox and choose "Maintenance UI Before").

As first statement after begin I have added:
MessageBox( "HELLO UNINSTALL IS CALLED", WARNING );

But if I uninstall the AddOn I don't get this message!
So I think this Method isn't called.

Have I to do anything more?

Thanks,

Markus

Aignerma

Aignerma
  • Members
  • 4 posts

Posted 18 December 2002 - 18:17

I have read something about event-based script.

My script starts with "program" and ends with "program end".
Is this a event-based script?

What have to do to get a event-based script?

Thanks

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 18 December 2002 - 21:11

Yes, I assumed your were using an event-based model, but if you have a program block then you are not.  That's also why you're not seeing the message.

Switching to an event-based is straight forward, but it may take some time for you to work out all the details and some of the new interactions.  You're users will also see different behavior than they do today.  For example, when they run an install for the first time, it will be the normal wizard, but subsequent times it will run in this new "maintenance" mode.  This can be overriden, but it is the default behavior.

To switch to an event model though, you "basically" take everything in program which comes BEFORE ComponentTransferData and put in the added  OnFirstUIBefore, and put everything AFTER in OnFirstUIAfter.  Then delete the remaining program block structure.  I am oversimplifying because I'm pressed for time, but these are the basics.  Be sure and make a good backup copy of your project beforehand though.

However, you can also get what you want to work in a program-driven model, but it's gonna take some additional work.  I actually prefer a program model and have the kind of uninstall functionality you are seeking.

I don't have time to fully go into this either, but you "basically" append a command line argument to the default uninstall command.  Then during OnBegin, check if that argument exists, and if it does, act like your uninstall.  Otherwise do your usual behavior of installing.

I'm sorry I couldn't be more specific, but maybe someone else out there in the forums has time to follow up with you.
user posted image