+ Reply to Thread
Results 1 to 6 of 6

Thread: How to display runtime variable in a messagebox?

  1. #1

    Default How to display runtime variable in a messagebox?

    I've spent half an hour reading the help files and I can't find any examples showing how to pass a runtime variable to a message box. The following does not work:

    Name:  2016-06-24_13-04-09.jpg
Views: 271
Size:  74.4 KB

    All I get is the variable name rather than the value of the variable.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to display runtime variable in a messagebox?

    Hello,

    #msg and #msgbox are compiler directives -- they display something at COMPILE time (in the IDE). But %INTERNET_EXPLORER_VERSION% is an installer runtime variable, resolved at installer runtime (in the setup). So you have to use the "Display Message Box..." function to display runtime variable values from the installer.

    Does this help?

    Friedrich

  3. #3

    Default Re: How to display runtime variable in a messagebox?

    It explains why the #msg and #msgbox are failing.

    How then can I debug the script within the IDE? IOW, how would I display the value of a Registry key within the IDE via the "Test" button?

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to display runtime variable in a messagebox?

    Hello,

    You have to click the "Debug" button to debug the script within the IDE (see attached screenshot).

    Does this help?

    Friedrich
    Attached Images Attached Images  

  5. #5

    Default Re: How to display runtime variable in a messagebox?

    But if I must use #msg and #msgbox with DEBUG then I am unable to use the runtime variable %INTERNET_EXPLORER_VERSION%. So now the question becomes, how does one display something like a Registry value during a debugging session within the IDE? If %INTERNET_EXPLORER_VERSION% can't be used with #msgbox, how does one display any variable or data from within the IDE?

  6. #6
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to display runtime variable in a messagebox?

    Hello,

    Please see my previous answer:

    ...So you have to use the "Display Message Box..." function to display runtime variable values from the installer...

    This will display your runtime variable value in RUN, TEST, or DEBUG.

    You only use #msg and/or #msgbox to display values at compile time (when you build a setup, e.g. to display the values of compiler variables), but not to display runtime variables at installer run time.

    Does this help?

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •