So I’m having problems with overriding silent mode. I’m trying to add a “quiet” behavior to my setup. The command line would be: “my_setup.exe QUIET=TRUE /s” with the idea being that sometimes I want to show some important messages even in silent mode.
I read this Tech Support comment stating:
For command line variable specifications to permanently override script commands, the setup must be running in silent mode. If setup is not silent, the script can overwrite values specified on the command line. .. The workaround therefore for non-silent setups is to parse the command line.
I’m not sure if I understand this correctly, because what I reckoned would work didn’t. I tried this:
-In the Define Setup Globals region I have this:
Set Variable SILENT_SAVE to $SILENT$
Set Variable _QUIET_MODE_ to FALSE
And then I parse the command line getting the value of “QUIET=TRUE” – so far so good.
-Testing this in the “Setup User Interview” region I have:
if Variable _QUIET_MODE_ Equals TRUE
Set Variable SILENT to FALSE
MessageBox: $TITLE$ Setup Error, DEBUGGING This works the message shows up
Set Variable SILENT to $SILENT_SAVE$
End
Again, so far so good – this works as expected.
-Then down in “Perform First Time or Maintenance region … region” --- this stops working:
if Variable _QUIET_MODE_ Equals TRUE
Set Variable SILENT to FALSE
MessageBox: $TITLE$ Setup Error, DEBUGGING Yeah whatever. This doesn’t show up.
Set Variable SILENT to $SILENT_SAVE$
End
I believe this last part is getting executed (in silent mode) because my surrounding test script gets executed.
Something seems wrong here, no? Any suggestions? Thanks!