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

Change default button on License dialog


3 replies to this topic

badejo

badejo
  • Members
  • 12 posts

Posted 14 March 2002 - 16:54

My boss wants me to change the default button from Yes to No on the SdLicense dialog.  His logic is that users won't be able to just press enter all through the install and later claim that they never saw any license agreement.  They would have to at least notice enough to actually click on the button.

I have tried editing the dialog so that the default property is true for "No" and false for "Yes", as well as changing the tab stop order properties so that the no button is first.

I think there has got to be a way to make the enter key select the no button, but I have not found it yet.  Any ideas out there?

druben

druben
  • Members
  • 12 posts

Posted 14 March 2002 - 18:01

Add the SdLic.rul to your project (copy it to your project from the Installshield\developer\Script\isrt\src folder). In the "case DLG_INIT:" section of the WaitOnDialog switch, place a "_WinSubFocusControl( hwndDlg, CONTROLID);" where CONTROLID is the ID of your No button (ie. the cancel button is IDCANCEL)  Add a #include line (#include "SdLic.rul") to the bottom of your Setup.rul in the "include script file section". This will incorporate the project version of the .rul file at compile time.

Give it a try, I haven't tested it but I have done other dialogs in the same fashion. Any time you want to alter the behavour of an IS dialog, add its .rul file to your project (remember to add it to source code control) and make the necessary changes. IS will use the .rul file in your project instead of the .rul in the IS install folder.
D. Ruben
Legato Systems, Inc.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 16 March 2002 - 09:52

Moved to Developer - Standard Projects forum

badejo

badejo
  • Members
  • 12 posts

Posted 18 March 2002 - 22:42

Your suggestion worked to an extent.  I was able to use your comments to get the space bar to press the desired button, but the enter key would still trigger the Yes button.

I was able to address this by setting the Default property on the Yes button to False ( it had been set to true on the original dialogue).  The enter key now does nothing.  Interestingly, if I set the Default property to true on the No button, that button does get pressed by the enter key, but instead of ending the install, as it should, in allows it to proceed.

At any rate, I was able to meet my objective of forcing the user to actually click on the Yes button, since the space bar triggers No and the Enter Key does nothing.  It is a bit of an inconvenience, but it forces the user to  conciously acknowledge that they are agreeing to a license by installing the software.  Since I can't scan their brain to verify that they have read it, that will have to do.

Thanks for your assistance.