Page 1 of 1

Problems with overriding silent mode

Posted: Thu Apr 06, 2006 2:26 pm
by stampy
Hi.

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!

Posted: Fri Apr 07, 2006 12:21 am
by MichaelNesmith
Your code looks fine to me...can you output the value of the silent variable in several places using Write to Text File, so we can see what's going wrong, if silent is somehow getting a wrong value, etc...

Posted: Fri Apr 07, 2006 12:38 pm
by stampy
To test this I created a brand new setup and placed the same code I mentioned above. I added the Write into Text File commands as suggested. After running this I find that the value of SILENT is FALSE and my dialog still doesn’t show up. Here is part of the script of interest:

Code: Select all

[DEFINE REGION: Perform First Time or Maintenance Installation]
  Comment: Install/Re-Install product
  Create Shortcut $SHORTCUTFOLDER$\\Uninstall my_test to $UNINSTALLLINK$
  [OFFLINE CONTENT]
  Write into Text File d:\\builds\\bin\\test\\test.txt from Value Perform First Time or Maintenance Install:  Silent=$SILENT$ and _QUIET_=$_QUIET_MODE_$ (at end of file)
  if Variable _QUIET_MODE_ Equals TRUE
    Set Variable SILENT to FALSE
    MessageBox: $TITLE$ Setup DEGUGGING, DEBUGGING -- Does this show up? 3 $NEWLINE$$NEWLINE$**This doesn't show up!** 
    Write into Text File d:\\builds\\bin\\test\\test.txt from Value Perform First Time or Maintenance Install -- Test QUIET:  Value of Silent=$SILENT$ and _QUIET_=$_QUIET_MODE_$ (at end of file)
    Set Variable SILENT to $SILENT_SAVE$
  end


I run this command line: my_test.exe QUIET=TRUE /s

Here are the results in Test.txt –the last line shows Silent=FALSE yet the MessageBox immediately next to it doesn’t show up:

Setup User Interview: Silent=TRUE and _QUIET_=TRUE
Setup User Interview--Test Quiet: Silent=FALSE and _QUIET_=TRUE
Start Installation: Silent=TRUE and _QUIET_=TRUE
Perform First Time or Maintenance Install: Silent=TRUE and _QUIET_=TRUE
Perform First Time or Maintenance Install -- Test QUIET: Value of Silent=FALSE and _QUIET_=TRUE

Posted: Fri Apr 07, 2006 12:55 pm
by MichaelNesmith
Can you send us a bare minimum project which reproduces this, so we can reproduce and fix it?

Posted: Fri Apr 07, 2006 1:11 pm
by stampy
Here ya go.

File Attached:

my_test.mpr

Posted: Fri Apr 07, 2006 4:10 pm
by MichaelNesmith
I need the MIA also! Thanks!

Posted: Fri Apr 07, 2006 5:19 pm
by stampy
Opps. The MIA was MIA (hehsorrybadjoke).

Posted: Fri Apr 07, 2006 5:19 pm
by stampy
here it is

File Attached:

my_test.mia

Posted: Sat Apr 08, 2006 1:05 am
by MichaelNesmith
Haha :lol: That's a good one!
Let me see what I can find out with this script and project, and I will escalate it for you as soon as I reproduce it. Thanks for sending!

Posted: Sat Apr 08, 2006 7:29 pm
by MichaelNesmith
I have reproduced this issue and escalated it for you. A resolution should be available soon.