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

Patch problem..


5 replies to this topic

jive02

jive02
  • Members
  • 40 posts

Posted 02 April 2002 - 11:06

Hi,

I've made a patch for my installation by simply modifying it be removing a few components and calling ComponentReinstall() on OnMaintUIBefore(). The problem is that now I can't uninstall the game, I guess the patch replaces the uninstall exe. This could be fixed be checking if the patch is installed and if so, do not install it but uninstall the game. However when I run the patch setup.exe I don't want the game to uninstall. See my problem? I don't want to change the GUID cause I only want one line in Add/Remove-programs. (btw here is another problem..how do I change the title of the game that is displayed in add/remove when I patch?)

Could someone please help me?
- jonas

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 02 April 2002 - 17:19

I understand your dilema.  Yes, since the patch has the same GUID it will overwrite the original game's uninstall entry and routines.  Here's some ways to address your concerns.

First, I would suggest having a diff. GUID for the patch.  The extra entry in Add/Remove Programs can easily be addressed.  To do so, simply rename/delete the following reg. entry:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<Setup's GUID>\DisplayName

I prefer to keep mine around, so I just make it OldDisplayName.

As for the changing the title of the available ARP entry.  Simply make the following call in your script:
RegDBSetItem(REGDB_UNINSTALL_NAME, "New name for ARP");

I make this call in OnMoving, but it may able to be done elsewhere.

Finally, for uninstalling, the approach which would have the cleanest results would be to have the patch uninstall itself via ComponentRemoveAll() and then call the game's original uninstall command which is stored under UninstallString in the location previously mentioned.  This will allow it to take everything off that your two setups applied.

To do so though, again the patch will need its own GUID.  It will also need to hide the DisplayName of the original game and probably change its own DisplayName.

If your patch truly just replaces exsiting files, another approach would be for the patch to still have its own GUID, but during the setup, hide itself from ARP.  That way, the original game's uninstall will still be used.

Hope it helps.
user posted image

jive02

jive02
  • Members
  • 40 posts

Posted 04 April 2002 - 10:30

Thank you for your reply. It helped a lot.

However, I have a followup question. I might need to remove files from the original installation with the patch. Can this be done and if so, will this put your above answer in a different light?
- jonas

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 04 April 2002 - 18:46

Yes, you can safely remove existing files under the patch.  Just make the appropriate calls from within your script.

Also, as long as you're not adding files, you can continue to use the original game's uninstall.  It will just skip over those files which no longer exist.

If you have any additional questions, let me know and I'll try and help you out.
user posted image

jive02

jive02
  • Members
  • 40 posts

Posted 14 August 2002 - 09:32

I thought I'd dig up this old discussion. :)

I I was to let the patch's uninstall call the main apps uninstall, What would happend if I uninstalled the main app before the patch. I'd be left with only a patch installed. I wouldn't want that.

If I would do it the other way tht you proposed, how do I go about to just let the patch installation install the needed files and not keep any files or registry entries for uninstallation?

Maybe the best way to do it is to add the patch GIUD to a log file and let the main installation go though this file and uninstall all the guid's.

What do you think?
- jonas

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 15 August 2002 - 06:32

I read this earlier this morning, but our Internet access was down at work all day ( :( ) and I don't feel like replying now, so I'll save my real comments/answer/opinions/ for another time.  Stay tuned.
user posted image