/build/static/layout/Breadcrumb_cap_w.png

Installing a Component based on a condition

Hello there,

before I start I want to make clear that I tried my best to find solutions to this problem before I decided to post here. I found various posts on this topic but none of them worked (at least not like I thought they should).

So here is my problem: I have a software which has a folder in which it saves a custom dictionary for spell checking. Since the software in question has to be deployed on a terminal server I have changed the path in a mst file (in order to avoid that the users of the terminal server overwrite each others custom dictionary). I created a new component which soley exists for creating this path on a network drive and everything works fine on a normal client.

Thing is, on the terminal server at the moment of the installation the service account of DSM7 doesn't have this network drive so the installation would fail. In order to fix that, each msi gets installed a second time with /fup parameters (in order to fix the registry and so on). I tried to use conditions in the component table in order to prevent the creation of the folder in the first "normal" installation but still creating it in the repair install. Sadly enough, none of the parameters/conditons I tried worked (like MaintenanceMode="Repair" or Installed and so on). All I archived is that it doesn't create the folder in the first (normal) installation but ist also doesn't install it in the repair run.

Obviously I'm missing something and of course I could easily get rid of this problem by a simple makedir command in DSM7 but I want to understand and learn why I can't seem to add it to the mst file. Like I said at the start of my post I tried to find a post on the matter, I read the documentation on the tables in question but I couldn't find a solution. Oh and I only use DSM7 for the deployment but not for editing the .mst. For that purpose I use InstEd.

If you need any kind of additonal information, please tell me. It's my first time posting here so I might have forgotten something.

Thank you for reading, it would be great if you could point me in the right direction :)


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: jagadeish 11 years ago
Red Belt
2

When you are checking the value of MaintenanceMode, you should not use MaintenanceMode="Repair" as condition, instead you should use _IsMaintenance="Repair" as condition anywhere after the MaintenanceType dialog box.

Moreover, _IsMaintenance is a private property—its name contains lowercase letters—its value will be reset when execution switches from the User Interface sequence to the Execute sequence, and therefore it cannot be used in the Execute sequence to detect the installation type.


Comments:
  • thanks for the info, I will try to use your advice in the future :) is there anything about my solution that could be improved? (see my answer, it apparently didn't show all of it until now... i don't know if thats a bug of itninja or just me beeing stupid) it seems to do the job just fine but since it might be flawed.
    I based it of this article, the rest is described in my solution: this article http://blogs.msdn.com/b/heaths/archive/2005/08/12/451037.aspx - timesink 11 years ago
Posted by: timesink 11 years ago
White Belt
2

funny how things start to work if you continue a day later... I just found an article about the matter and I was 100% sure I used the REINSTALL Condition already but apparently I was wrong: now it works, I just entered REINSTALL AND NOT PATCH AND NOT REMOVE=~"ALL" and it seems to do the job. Since I only create a path with this condition I don't think I need to be aware of the fact that REINSTALL is set while patching/uninstalling, but I thought it might be a good idea to add the other two condition parts. If you guys think that is wrong/not needed please tell me. As someone who tries to understand MSI on his own its sometimes kinda hard to differ between right and wrong ;)


Comments:
  • Thanks we appreciate your taking the time to share your solution and marking the question as answered - bkelly 11 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ