PDA

View Full Version : IF / END IF


PHILB
06-14-2002, 03:55 AM
I am new at this. So please bear with me....
Using SUF6..
I want to check for the operating system NT4 or W2K and perform the action of closing a program or executing a program from the %TempLaunchDir% depending on the OS. I am using the following statements in the "Screen Properties 'After'" tab of the Welcome screen:-

IF (%IsWIN2000% = TRUE)
Close Program (Program "pnrimport70.exe",Force termination)
Close Program (Program "eclipse.exe",Prompt user)
END IF
IF (%IsWINNT4% = TRUE)
Execute %TempLaunchDir%\kill.exe
Close Program (Program "eclipse.exe",Prompt user)
END IF

In both cases when installing on the relevant OS. According to the logfile the OS variable =TRUE, but none of the commands following the IF statement run.
Am I missing something basic?

Laslie Toth
06-17-2002, 07:53 AM
What version of SF are you use?

Lorne
06-17-2002, 11:30 AM
Are you sure that specific Welcome screen is being shown? (If you have more than one of them, perhaps for a multilingual install?)

Are you sure the actions are not being performed? (If the OS variables are true, then those actions should definitely be performed.) Try setting user notification to "Verbose" on the On Error tab for each of those actions, so you can see if any errors are occurring. You could also insert a "Show Message Box" action in each IF block to see if the actions in the block are being "reached."

Also, are you sure about the program names? You might want to try using the other options (full path and filename, or Window name) to identify the program you want to close.

PHILB
06-17-2002, 09:02 PM
Thanks Lorne,
Tried your idea of using the message boxes and was able to fix the problem....

Lorne
06-18-2002, 01:53 AM
You're welcome. /ubbthreads/images/icons/smile.gif

Ancient Programmer's Trick: 1
Squirrely Problem: 0

MikeReid
06-23-2002, 04:36 PM
Maybe I am just missing something here...

When trying to run a setup in Silent Mode, it doesn't appear to prompt the "Show Message Box" actions.

Alternatively, I have TRIED switching silent mode OFF on the SAME setup, and the message box appears??

How do I go about having a message box/yes or no prompt appear while running in silent mode?

Maybe I'm missing something, but to me, Silent Mode shouldn't mean disallowing a form of communication (custom message prompts) to the user.

If this is a bug, I opt to enable message boxes during silent mode setups.... or am I asking for something that is altogether unattainable?

Mike

Lorne
06-24-2002, 12:09 PM
I asked the same question during development, Mike. /ubbthreads/images/icons/smile.gif But silent mode was originally requested as more of a "fully automatic" mode. Think of it as an absolutely silent mode, no prompting, nothing...run it in silent mode, and nothing will appear, at all.

Perhaps in a future version we might break it into two modes, one that prevents screens from being displayed, and one that prevents message boxes from being displayed...or maybe we'll add an option to the Show Message Box action to make it display even in silent mode.

In any case, for now you must make assumptions for the user whenever silent mode is enabled.