PDA

View Full Version : Abort Install Question


Auto
02-03-2004, 06:17 PM
Hello community. I'm new here (duh) and a beginner at Setup Factory. Anyway....

I've scanned through the threads looking for a possible solution to my issue, but haven't seen what I'm looking for. First I would like to specify a base numeric value and store it (somehow). I would like my install program to read a numeric value from a registry key and store this value. I then wish the installer to examine the stored number. If that number is less than a number than I define somewhere the install aborts with a custom error message. If the number read is greater than a number that I specify the install continues. I have looked at TRUE/FALSE approach, but that doesn't quite fit what I need to happen.

Kind of like something similiar to incremental game patches meant to upgrade from a specific version to another version, but if you are starting off at a lower version other than a specifc value, the installer aborts. My question is a little different as I want to define a base number and then only allow the installer to continue if the value of the registry is equal to or greater than the base number.

Thank you in advance.

Darryl
02-04-2004, 04:51 PM
Hi,

If I understand your question correctly, what you could do is the following, assuming that you have already stored an initial numeric value in the user's Registry.

1) On the Startup actions tab, you could first create a "Read from Registry" action that will read the contents of that Registry key and store it in a variable, let's call it %RegistryVar%.

2) You could then add an "Abort Install" screen as your first screen in your install.

3) On the Abort screen's properties dialog, click the Settings tab. There you will find a "Screen Condition" field where you can define a condition that will tell Setup Factory whether or not that screen should be displayed and abort the install.

Therefore you could have a condition such as:

%RegistryVar% < 12

assuming that the number 12 is the number you hard coded into the install to control whether or not to abort.

You could even have a couple conditions such as:

(%RegistryVar% < 12) AND (%RegistryVar% > 15)


Hope that helps. I hope I didn't misunderstand your question.

Adam
02-04-2004, 04:52 PM
Auto,

You would have to create an action script to accomplish this. It would look something like:

%InstallNum% = 4
%RegNum% = Read From Registry(........blah blah)
IF (%InstallNum% < %RegNum%)
Abort
END IF

That is the general concept.

Adam Kapilik

Auto
02-04-2004, 08:16 PM
Thanks for the responses. I'll give each a try. (If I can figure all that out).

hitchcockgreen
02-26-2004, 12:25 AM
I tried putting an 'abort install' screen first, and even if my installer finds the registry key it's looking for, it still tells me that the install will now abort before it goes on to the next screen.
I know there's a 'preventnextscreen' variable, but no variable for skipping a screen?

Darryl
02-27-2004, 10:34 AM
The showing and skipping of screens is based on the result of the screen condition located in the "Screen Condition" field on the Settings tab of the screen's properties dialog.

If there is no condition, or the condition results in TRUE, the screen will be shown. If the result is FALSE, the screen will be skipped.

In your case, the condition must fail in order for that screen to be skipped.

Hope that helps.

Darryl