View Full Version : How to display runtime variable in a messagebox?
instrumentally
06-24-2016, 11:07 AM
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:
4332
All I get is the variable name rather than the value of the variable.
linder
06-26-2016, 02:42 AM
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
instrumentally
06-26-2016, 06:44 AM
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?
linder
06-29-2016, 01:57 AM
Hello,
You have to click the "Debug" button to debug the script within the IDE (see attached screenshot).
Does this help?
Friedrich
instrumentally
06-29-2016, 02:22 PM
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?
linder
06-30-2016, 12:47 AM
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
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.