Yoster
Posts: 10
Joined: Mon Oct 04, 2010 5:39 pm

Starting "Customize Dialog" directly from Application

Hi Everybody,
I am looking for a possibility to start the "Customize Dialog" (CustomizeDlg) directly from my application written in Java. Up to now I am able to start the Maintanance Dialog this way:

Runtime.getRuntime().exec("msiexec.exe /i" + productCode);

So again: Is there a way to directly start the Customize Dialog?
Thanks for help.
Regards
Yoster
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Starting "Customize Dialog" directly from Application

Hello Yoster,

To achieve this you need to do the following:
  • show "MaintenanceWelcomeDlg" in "Custom Actions" page under "InstallUISequence" and set its execution condition to:

    Code: Select all

    AI_MAINT AND NOT FASTCUSTOMIZE
  • add 3 "Property Set with Formatted" custom actions after "MaintenanceWelcomeDlg" each set with their execution conditions to:

    Code: Select all

    AI_MAINT
    ->first:
    Property Name: InstallMode
    Formatted Text: Change
    ->second:
    Property Name: Progress1
    Formatted Text: [CtrlEvtChanging]
    ->third:
    Property Name: Progress2
    Formatted Text: [CtrlEvtchanges]
  • add another "Property Set with Formatted", modify its name to "CustomizeDlg" and set its execution condition to:

    Code: Select all

    AI_MAINT AND FASTCUSTOMIZE
I have attached a sample project which implements this functionality just in case.

In the end all you need to do is run your command line like this:

Code: Select all

Runtime.getRuntime().exec("msiexec.exe /i" + productCode + "FASTCUSTOMIZE=1");
When the public property FASTCUSTOMIZE is set, the "CustomizeDlg" will be shown first and when it is not defined the "MaintenanceWelcomeDlg" is shown first instead.

Best,
Mihai
Attachments
test1.aip
(17.95 KiB) Downloaded 341 times
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Yoster
Posts: 10
Joined: Mon Oct 04, 2010 5:39 pm

Re: Starting "Customize Dialog" directly from Application

Hi Mihai,
thanks a lot for you answer, but it doesn't work here.

This command:
Runtime.getRuntime().exec(msiexec.exe /i" + productCode + " FASTCUSTOMIZE=1");

in fact skips the "Maintenance WeIcome Dialog" but the Dialog that appears first is the Progress Dialog and finally the "Exit Dialog". That means, that the Customize Dialog is skiped as well. That's a little too FASTCUSTOMIZED :wink:

I am sure I have used the steps as you told me and have compared the source code of my *.aip file with the test1.aip file you sent. So there should not be the mistake.
Do you have any idea what to do now?

Thanks for further help and merry christmas.
Many regards
Yoster
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Starting "Customize Dialog" directly from Application

Hi Yoster,

I just tested the sample I attached in my last post and the "CustomizeDlg" is shown first as intended.
You can verify this yourself by running the attached project first and then running the following command in the CMD shell:

Code: Select all

msiexec.exe /i {3980686A-935C-4F23-93F8-33CC0BBAB359} FASTCUSTOMIZE=1
Also, my recommendation is to test your project using the CMD shell as well. If it works then most probably the command string you are passing to the exec method in Java is not the correct one.
For example the following code line from your last post is missing a quotation mark:

Code: Select all

Runtime.getRuntime().exec(msiexec.exe /i" + productCode + " FASTCUSTOMIZE=1");
It should be something like:

Code: Select all

Runtime.getRuntime().exec("msiexec.exe /i " + productCode + " FASTCUSTOMIZE=1");
Hope this helps,
Merry Christmas !
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”