Page 1 of 1

Uncheck the 'Run Now' checkbox...

Posted: Wed Aug 26, 2009 7:42 pm
by Steve
I am sure that the answer is probably staring me in the face, but frustration has set in I can't see the forest for the trees... so, swallowing my pride, here goes...

On the 'Finish' dialog there is a 'Run Now' checkbox.
When I run my compiled installation, the 'Run $Title$ Now' checkbox is always enabled. Enabled appears to be the default mode, however in this case I would like the checkbox default to be 'not checked' (disabled). There is no 'Unchecked' Property Value available for this control (there is only a 'Checked' Property Value available), so obviously that is not the solution. I have the 'Checked' property = 'False' and the 'State' property = 'cbUnchecked', yet when the 'Finish' dialog appears at the conclusion of an install the darned 'Run Now' checkbox is always enabled (checked).
I cannot find any MSI code that is enabling the Run Now checkbox. So what gives?

On all of my previous installs this has never been a issue because the default checkbox enabled behaviour was desired. However now that I need to change this, for the life of me I cannot figure out a way to do it.

Any help is greatly appreciated.
Steve

Posted: Thu Aug 27, 2009 7:30 am
by ChrisN
Hi Steve.

Insert the following in MSIcode before calling Display Dialog: finish:

Set Variable RUNAPP to FALSE


Best regards.

Posted: Thu Aug 27, 2009 3:26 pm
by neillans
Going to make this post a sticky, as it comes up a lot :)

Posted: Mon Aug 31, 2009 2:49 pm
by Steve
Hi Chris,
Worked perfectly!
Thanks very much for your response.

For anyone following this thread I have included the code area affected. The "Set Variable RUNAPP to False" suggested by Chris is located third line down from the top.

Code: Select all

[DEFINE REGION: Finish Setup]
Comment: End of Installation
Set Variable RUNAPP to False
Hide Dialog
Display Dialog: finish, wait for dialog to return (modal)
if Variable SILENT Equals FALSE
  if Variable REBOOTCOMPUTER Equals TRUE
    if Variable SUCCESS Equals REBOOT
      Reboot Computer
    end
  end
  if Variable RUNAPP Equals TRUE
    if Variable REMOVE Equals FALSE
      if Variable SUCCESS Equals COMPLETE
        Comment: TO-DO: Insert command that starts your application here
        Run Program $TARGETDIR$\\myapp.exe
      end
    end
  end
end
END REGION

Thanks for codew

Posted: Thu Nov 19, 2009 11:40 am
by ParallaxiT
Steve - thanks for posting the code affected. Makes it a lot easier for everyone who is experiencing problems to understand solutions.

Cheers :D

Re: Uncheck the 'Run Now' checkbox...

Posted: Wed May 19, 2010 3:59 am
by prezmer
Hi,
I went into the same problem, luckily I was able to delete post with exact question. IMO it is not natural to change it inside script. I guess it is the way to extend possibilities of setup customization. I would add a note on Dialogs screen in User Interface branch, something like "dialogs behaviour like "run/restart now" can be configured using MSICode"