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

Repair mode corrupts the installation.


4 replies to this topic

installer_wow

installer_wow
  • Members
  • 8 posts

Posted 25 June 2004 - 06:46

Hi,

I have written a win32 dll that contains all the custom actions that I want to perform during installation and un installation.
Also I am shipping some third party controls that bind themselves tightly with Outlook and Word.
At the development machines the installer service is invoked for no good reason and tries to repair the installation, which calls all the custom action and corrupts the entire installation.
Is there any way I can prevent my installer to run in repair mode.
Also is there any way to "detect" whether my installation is running in Repair,Remove or Modify mode.
Being a newbie, I am not totally aware of the technology.

Thanks in advance,

Akshay Arora
ND.




Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 25 June 2004 - 08:32

Unwanted repair operations have many causes. Check the event log to figure out what component caused the repair to be triggered. Some common causes: files installed to the local user profile that are not accessible for other users, a file in the tmp folder set as keyfile and the file has gotten deleted, components that point to empty folders, etc... Search this board and you will find many suggestions.

You could, but should not prevent your installation to be run in repair mode (manually invoked). You cannot prevent self-repair to occur (which is in effect an automatic repair mode).

To detect whether the installation is running in Repair,Remove or Modify mode:

Fresh install: Not Installed

Uninstall: (Remove = "ALL")

The repair and modify options are more problematic. I cannot guarantee these conditions, but try something like:

Repair = (Installed AND (REINSTALL="ALL"))

Modify = Installed

OR MAYBE:

Modify = (Installed AND (REINSTALL<>"ALL"))

Stefan, do you have a better way to detect repair and modify? I am not even positive REINSTALL is set to ALL during repair, but logically it should.

Edited by Glytzhkof, 25 June 2004 - 08:33.

Regards
-Stein Åsmul

installer_wow

installer_wow
  • Members
  • 8 posts

Posted 29 June 2004 - 12:19

None of these checks for Repair and Modify seemd to work.
But I have created a PUBLIC Property whose defualt value gets overwritten by the action user is performing on the click of a button.
I then use this property to check what's going on (Modify,Repair or Remove) throughout the script.

This seems to work so far.

Regarding the automatic repair of a MSI, can setting the Installer Service to start Manually helpful.

Just fishing in the air.....

Akshay.




Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 29 June 2004 - 12:44

Sorry that the suggestions didn't work correctly. I don't have access to Installshield and couldn't test them. The property "Installed" will only be set during a repair or modify install, so it will detect that it is one or the other, but not which one it is. Your solution should be OK. If the setup is done from the command line and silently, I suppose there could be some problems. If I were you I would delete this property from the registry at the end of the installation process to prevent it from being set with a wrong value. If self-repair run it may do something unexpected based on the property setting in the registry.

You may also do well to add this property to the SecureCustomProperties list in case your setup is run on managed systems with elevated rights (in managed systems with restricted user rights not all public properties are passed to the server process, just those enumerated in SecureCustomProperties).

The only way to make Windows Installer ignore a component is to use a blank component GUID. I wouldn't recommend this. Please don't disable the windows installer service! You will have angry customers!

Edited by Glytzhkof, 29 June 2004 - 12:51.

Regards
-Stein Åsmul

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 01 July 2004 - 05:12

For future reference:
http://www.installsh...iconditions.asp
Regards
-Stein Åsmul