PDA

View Full Version : basic MSI/enable-disable button refresh issue



achal009
06-12-2008, 12:58 AM
Hi friends,

I had 3 doubts can u please help me with those:

1) I have a dialog box which asks for user name and password and stores them in a property names USERNAME and PASSWORD respectively.

I have to disable the next button if any of the fields are blank,so i put a condition on the next button as:
Action Condition
Disable USERNAME = "" OR PASSWORD = ""
Enable USERNAME <> "" AND PASSWORD <> ""

Now when I enter something in both fields I have to change focus after ebtering data into 2 nd field then only "Next" button becomes enabled,it should become enabled as soon as something is typed into both the fields. Please suggest.

2) Can I create Installer.exe rather than setup.exe directly when I do a build for installer. I can rename Setup.exe to Installer.exe and it works.

3) How do I change the icon displayed by Setup.exe can I customize it to some other icon rather than the Install Shield icon.

Thanks ion advance.

Regards,
achal

DLee65
06-12-2008, 04:31 AM
1. Unfortunately there isn't anything that you can do for this. Windows Installer does not monitor text box messages and therefore does not recognize character input into the text box until you move from the field. If anyone else has any ideas about how to solve this using Basic MSI dialogs I could certainly use that. :)

2. Look at your release configuration, there is a field called "Setup file name". You can change the default name of 'setup' to 'Installer'. You do not need to supply the .exe extension.

3. I thought for sure that you could specify an icon resource for the setup.exe in a Basic MSI setup, but apparently I am thinking of InstallScript installations. I checked around in the release settings and there isn't anything that allows me to set the icon resource for the EXE.

achal009
06-13-2008, 02:12 AM
Thanks Dan,
It helped.

One more doubt.

Under System configuration we have a column for Registry.

In a basic MSI project can i create a registry "key" ,have a registry "value name" under it. Now can I give it a "value data" which belongs to "value data" of some other registry "value name".

DLee65
06-13-2008, 07:31 AM
Achal,

Hopefully I am understanding your question correctly. You basically want to copy a value from a pre-existing registry entry to a new registry entry that gets created by your installation. Is my understanding correct?

If so you first need to create a System Search for a registry Key value that searches for the pre-existing registry value. Look up in the help for "System Search" for specific steps to do this. You need to assign that System Search value to a PROPERTY, lets say we call it COPYREGKEYVALUE.

Next, go to the components view. Select the component that you want to associate this new registry entry to. When the component is "installed" then the registry entry will also be created.

Expand the component tree view and select the registry option. Create the key in the correct registry hive and key leaf that you desire. Set the name for the key you are creating. Next for the name value you would enter [COPYREGKEYVALUE] including the square brackets. What this does is tell the installer to set the value to the value of the COPYREGKEYVALUE property.

Hopefully this gets you on the right path to finding a solution to your installation needs.

Christopher Painter
06-13-2008, 08:52 AM
Correct about the ControlCondition not evaluating until certain controls lose focus. The `workaround` generally discussed is to use a blocking ControlEvent custom action or dialog instead. It's not quite the same look and feel but it gets the general job done.

DLee65
06-13-2008, 09:53 AM
Ok, you have my interest Chris :) Can you give an example of a "blocking ControlEvent"?

For example lets say that I have a dialog that has a single text field. The field must contain data in order for the NEXT button to become active. Is there something I can do to make the NEXT button become active immediately after the customer types in a single character?

achal009
06-16-2008, 01:08 AM
Hi Dan,
Thanks for the useful info. It helped me a lot.

Chris,
Thanks for the suggestion on "chage focus" issue. Could you please elaborate it a bit.

samiracr
07-26-2010, 11:29 PM
Hi Achal,
Where did you put the following code and how:

Disable USERNAME = "" OR PASSWORD = ""
Enable USERNAME <> "" AND PASSWORD <> ""


Hi friends,

I had 3 doubts can u please help me with those:

1) I have a dialog box which asks for user name and password and stores them in a property names USERNAME and PASSWORD respectively.

I have to disable the next button if any of the fields are blank,so i put a condition on the next button as:
Action Condition
Disable USERNAME = "" OR PASSWORD = ""
Enable USERNAME <> "" AND PASSWORD <> ""

Now when I enter something in both fields I have to change focus after ebtering data into 2 nd field then only "Next" button becomes enabled,it should become enabled as soon as something is typed into both the fields. Please suggest.

2) Can I create Installer.exe rather than setup.exe directly when I do a build for installer. I can rename Setup.exe to Installer.exe and it works.

3) How do I change the icon displayed by Setup.exe can I customize it to some other icon rather than the Install Shield icon.

Thanks ion advance.

Regards,
achal