finkbr
Posts: 9
Joined: Fri Jul 11, 2008 5:59 pm

customDlg In Maintenance Mode

Hi,
I am using a custom dialog and its in the right place in maintenance mode, but I am getting an error reinstalling a feature. I only have 1 feature but there are a few files for a host implementation that a user might need to re-install. I select modify and it displays the standard modify repair and remove options. if i select modify, it displays my dialog with install host, install client and install client & host. I want it to re-install whatever item I select (push button select). I get a 2711 (i think that was the error) Unfortunatly I would not be able to send the aip file since it is in a secure lab. In the events for the button I set install mode to reinstall and reinstall to 5 (thats what I use for these particular files) the new dialog action goes to a custom verify ready (like maintenance goes to verifyrepair etc..) when I click the install button, it says there is an error in the msi or the msi is corrupt. I have looked everywhere for doing something like this and can't seem to figure it out. What actions do I have to do to get it to install the items I want? Under organization, I have the conditions set to REINSTALL= 5 or REINSTALL = 6 which is what I am trying to set. I think I am 99% of the way there but am missing one small step somewhere. any help would be appreciated.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: customDlg In Maintenance Mode

Hi,
I get a 2711
This error means The specified Feature name ('[2]') not found in Feature table. Most likely the buttons are associated with features which are not in your project.
I set install mode to reinstall and reinstall to 5
Please note that the Reinstall property must be set to the identifiers of the features which will be reinstalled. If you want to reinstall all features you can set this property to "All".
Under organization, I have the conditions set to REINSTALL= 5 or REINSTALL = 6 which is what I am trying to set.
Please note that Reinstall is a reserved property and it shouldn't be used like this.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
finkbr
Posts: 9
Joined: Fri Jul 11, 2008 5:59 pm

Re: customDlg In Maintenance Mode

Thanks for the information but you have given me nothing that will help me solve this problem. My initial install works fine. I can install the client, host or both. To do that I set the installlevel to different numbers and install based on the number. 3 = client only 5 = host only and 6 both client and host. in maintenance mode I want to do the same thing so I made a custom dialog that has the same buttons as the initial install. I set the modify button to open this dialog. that part works. When I click on a button nothing happens. So I thought I needed a readydlg. (similar to remove ready and repair ready) I don't know what action I need for this dialog to make it work properly. I have read everything I can think of and your documentation is a bit lacking in this area. Any information you have that will help me make this thing work would be appreciated.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: customDlg In Maintenance Mode

Hi,
When I click on a button nothing happens.
This happens because a button requires control events to know what to do. For example, you can use a NewDialog control event to show a dialog and a SetProperty control event to set an installer property.
So I thought I needed a readydlg
Please note that the Maintenance mode already contains this type of dialogs for all three default options:
- VerifyRepairDlg for the "Repair" option
- VerifyRemoveDlg for the "Remove" option
- VerifyReadyDlg for the "Modify" option

You can modify these dialogs to suit your needs. Since you cannot send us the project you are using, I'm not sure what settings you are using.
if i select modify, it displays my dialog with install host, install client and install client & host. I want it to re-install whatever item I select (push button select).
For the "Modify" option Advanced Installer shows by default the "CustomizeDlg" dialog. Therefore, you can modify "CustomizeDlg" to fit your needs. However, this is not recomended if your package uses the "SetupTypeDlg" dialog ("CustomizeDlg" is the same for all dialog sequences).

If you cannot modify "CustomizeDlg", you can create a custom dialog which replaces it. Perhaps the Add a dialog after "SetupTypeDlg" how-to will help you (it doesn't explain your exact scenario, but it shows how to manipulate the dialogs).

I'm not sure how your project is configured, but it should contain two features in the Organization page: one for client and one for host. The "Install Client" button should use these published control events:

Code: Select all

[InstallMode]        Repair              1
[Progress1]          [CtrlEvtRepairing]  1
[Progress2]          [CtrlEvtrepairs]    1
ReinstallMode        ecmus               OutOfDiskSpace <> 1
Reinstall            InstallClient       OutOfDiskSpace <> 1
EndDialog            Return              OutOfDiskSpace <> 1
EndDialog            Return              OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"
EnableRollback       False               OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"
SpawnDialog          OutOfDiskDlg        (OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")
SpawnDialog          OutOfRbDiskDlg      OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)
The are the published control events for the default "Repair" button on the "MaintenanceTypeDlg" dialog and for the "Repair" button on "VerifyReadyDlg". Note that the Reinstall property is set to the InstallClient feature in order to repair only this feature. For the "Install Host" button the property should be set to the "InstallHost" feature. Also, for the button which repairs both features Reinstall should be set to All.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
finkbr
Posts: 9
Joined: Fri Jul 11, 2008 5:59 pm

Re: customDlg In Maintenance Mode

Basically my problem now is that if I only install one part of my app, I can't install another part later. I am trying not to use the CustomizeDlg and am using my customDlg. I only have one feature but am installing 3 different files based on installlevel. when I am in maintenacne mode, what do I set reinstall to to be able to install files based on installlevel? I have tried setting up different features, a Host Feature and a Client Feature. I also tried setting reinstall to InstallClient but that did nothing for me. I have tried looking at the windows installer documentation for tips but when you don't know what you are looking for it is difficult. All of my problem revolve around maintenance mode, everything works like I want it to for the inistal install.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: customDlg In Maintenance Mode

Hi,
Basically my problem now is that if I only install one part of my app, I can't install another part later.
Please note that this is supported through the default dialogs:
- split your project into multiple features, one for each part of the application
- add "SetupTypeDlg" dialog in the "Dialogs" page

When the user installs the package, he will be able to choose which features (parts of the application) will be installed. Also, by using the "Change" button in "Add or Remove Programs" the user will be able to select the "Modify" button from the "MaintenanceTypeDlg" dialog. This will allow him to change which features are installed.
I only have one feature but am installing 3 different files based on installlevel.
Note that it is recommended to use a different feature for each part of the application. If the applications has two parts (client and host), then the package should have two features (one for client and one for host).
what do I set reinstall to to be able to install files based on installlevel?
Since you have only one feature, the "Reinstall" property can be set to "All". However, please note that the INSTALLLEVEL property is overridden by the Repair process. Therefore, you cannot use the install level to condition components or features during a repair.
I have tried setting up different features, a Host Feature and a Client Feature. I also tried setting reinstall to InstallClient but that did nothing for me
Please note that this is the recommended approach. When setting the "Reinstall" property did you use the name of the feature or its Identifier? Note that you need to use the Identifier because two features can have the same name.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
finkbr
Posts: 9
Joined: Fri Jul 11, 2008 5:59 pm

Re: customDlg In Maintenance Mode

Please note that this is supported through the default dialogs:
- split your project into multiple features, one for each part of the application
- add "SetupTypeDlg" dialog in the "Dialogs" page
I understand that. Believe me I have tried. I made a custom dialog to make it look like I wanted it to, I even copied all of the events etc... Now I am trying to make modify work properly by NOT using the feature tree because unfortunatly I have "challenged users" I just want a button that says client, host and client & host. I will set it up using two features and try again.

Since you have only one feature, the "Reinstall" property can be set to "All". However, please note that the INSTALLLEVEL property is overridden by the Repair process. Therefore, you cannot use the install level to condition components or features during a repair.
Well then what can be used? Its not well documented, in your documentation maybe you can put links to Windows installer docs for what options aravailable because its pretty frustrating. So is waiting a day between answers.
Please note that this is the recommended approach. When setting the "Reinstall" property did you use the name of the feature or its Identifier? Note that you need to use the Identifier because two features can have the same name.
I would be happy to do it this way BUT don't know how to get the identifier. Maybe you could put it in the documentation. How do I determine the identifier?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: customDlg In Maintenance Mode

Hi,
Well then what can be used?
The solution is the one I mentioned: use two features and depending on which button is pressed you set the Reinstall property to one of them.
don't know how to get the identifier
Please note that the Identifier of a feature is set in the first field on the Feature Properties page (this page is shown when you select a feature in the "Organization" page).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
finkbr
Posts: 9
Joined: Fri Jul 11, 2008 5:59 pm

Re: customDlg In Maintenance Mode

OK so this morning I created a second feature, added the files I needed to set. In my custom maintenance dialog (that replaced the CustomDlg) I set the button ro reinstallmode ecmus, reinstall host and new dialog readydlg. Clicking the bitton doesn't do anything. additionally, if the conditions, I set not installed or reinstallmode=change. When I go back and look at the conditions, it says 1 AND not installed or reinstall=change. I think this is incorrect, when I click on the conditions ... button I don't see a 1 in the textbox. Bug??? Still the same problems I have had in the past trying to do this. I am going back through this thread and re-trying everything. I did set reinstall to Host (the name I gave the Feature) Thats the identifier I thought you meant but it didn't work.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: customDlg In Maintenance Mode

Hi,

I attached to this post a sample project which does what you need. You can use it as an example in order to find out what you need to do to your project.
I set not installed or reinstallmode=change
Please note that the ReinstallMode property can be set only to a string formed from the parameters supported by Windows Installer.
it says 1 AND not installed or reinstall=change. I think this is incorrect, when I click on the conditions ... button I don't see a 1 in the textbox. Bug???
No, this is not a bug. All control events must have a true condition in order to run. This condition is set by default to "1", "AI_INSTALL", "AI_MAINT" or "AI_PATCH". Since this condition is mandatory, you cannot modify it.
I did set reinstall to Host (the name I gave the Feature) Thats the identifier I thought you meant but it didn't work.
The identifier of a feature is not the same as the name of the feature. The name is the one you see in the feature tree and the Identifier is the one you see in the Identifier field in the Feature Properties page.

Regards,
Cosmin
Attachments
example.zip
(3.15 KiB) Downloaded 206 times
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
finkbr
Posts: 9
Joined: Fri Jul 11, 2008 5:59 pm

Re: customDlg In Maintenance Mode

finkbr wrote:The identifier of a feature is not the same as the name of the feature. The name is the one you see in the feature tree and the Identifier is the one you see in the Identifier field in the Feature Properties page.
I changed the name of the feature to Host and client, is this causing my problem? I'll try rebuilding the project from scratch and seeing if that fixes my problem along with your example.
finkbr
Posts: 9
Joined: Fri Jul 11, 2008 5:59 pm

Re: customDlg In Maintenance Mode

I have now tried the example you posted. Maybe I was not clear in my description of the problem. If I DO NOT install both the client and the host, (i.e. Install client only) then go back and re-run the installer in maintenance mode, then I select host, it does not install that feature. even with all of the options you showed me. it simply verieies the configuration and does not install any of the new files. If in initially install both client and host, it will then reinstall whatever I select.

I am now trying to just use the example you sent and adding all of my files to it to see if it will work that way, maybe my project is just screwed up. I will also try and make a fake project exactly like the one I have in the lab without real files and see if I can send that one to you.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: customDlg In Maintenance Mode

Hi,

I modified the project and the buttons now install the feature if its not installed. Please note that I used "AddLocal" control events to set the feature which will be installed. Also, I conditioned the "AddLocal" and "Reinstall" control events based on the feature state ("!ClientID=3" means that the feature with the identified "ClientID" is installed).

Let me know if you need more details about the modifications.

Regards,
Cosmin
Attachments
example.zip
(3.22 KiB) Downloaded 213 times
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”