PDA

View Full Version : 2 installs in one



NewsArchive
07-06-2007, 12:21 PM
I know there is a way to do this, but I just can't figure it out... maybe an
example does this and I'm just not seeing it. I want to have to installs in
one... where based on a product key that the user enters, they either get a
single computer install or a network install. Basically the difference is
just where the files are located, some settings in the ini and the network
install would also include a workstation install.

Any suggestions to point me in the right direction would be appreciated.

Thanks,

Lisa

NewsArchive
07-06-2007, 12:21 PM
Lisa,

Is this a "fixed" product key or do you have to "validate" the key? For
example, you have used the built-in serial number generator to generate two
lists of valid serial numbers for two products (client and server install).

We have several options to handle this (Features, Setup Type and Features,
controlled by If..Then..Else Statements). If you are interested, please
provide some more information and we'll develop a small "skeleton" for you.

Friedrich

NewsArchive
07-06-2007, 12:21 PM
Hi Friedrich,
It is a key that I am validating... I already have the code for that and
it's validating properly... I will just have to modify it to return the type
(network or single), but I think I can handle that part.

I would like this to be invisible to the user installing, is that possible?
They will see the same screens no matter which one they are installing, it
would just be controlled by what that product key validation returns to me.

Thanks,
Lisa

NewsArchive
07-06-2007, 12:22 PM
Hi Lisa,

Yes, no problem. This can be done. But how do you validate the key? Using
a DLL or through SetupScript code?

Friedrich

NewsArchive
07-06-2007, 02:07 PM
Oh sorry, through a dll call... here's the code I currently have in the
script editor. I am using the password screen to handle input.

! Validate that the product key is valid for this customer
If %_SB_DIALOGID% Equals "4" Then
Set Variable %_SB_PASSWORD% to FUNCTION:Upper(%_SB_PASSWORD%)
Call DLL "%TMPDIR%\serial.dll" -- Function "VALIDATEPRODUCTKEY"
(*cstring, *cstring, *cstring) (%_SB_USERSERIAL%,%_SB_PASSWORD%,
%INSTALLVER%)
! Not a length of 22
If %_SB_RETURN% Equals "1" Then
Display Message Box "The Product Key you entered is not the proper
leng..." -- "Invalid Product Key"
Cycle Loop
End
! either not a key for windows or not for taskmaster
If %_SB_RETURN% Equals "2" Then
Display Message Box "The Product Key you entered is not a valid for
Tas..." -- "Invalid Product Key"
Cycle Loop
End
! doesn't contain dashes in the right places, invalid product type or
addon string - wrong format
If %_SB_RETURN% Equals "3" Then
Display Message Box "The Product Key you entered is not a valid
format." -- "Invalid Product Key"
Cycle Loop
End
! not a valid customer number format or doesn't match customer number
entered on prior screen
If %_SB_RETURN% Equals "4" Then
Display Message Box "The Product Key you entered is not valid for
custo..." -- "Invalid Product Key"
Cycle Loop
End
! product key version doesn't match install version
If %_SB_RETURN% Equals "5" Then
Display Message Box "The Product Key you entered is not valid.
This in..." -- "Invalid Product Key"
Cycle Loop
End
End

Lisa Daugherty

NewsArchive
07-06-2007, 02:07 PM
Hi Lisa,

Thank you. I'll give it some thoughts now and get back to you. I am too
brain dead right now to think up something clever :)

Friedrich

NewsArchive
07-06-2007, 02:07 PM
Thanks, I appreciate any insight you can give me!
Lisa

NewsArchive
07-10-2007, 05:53 AM
Hi Lisa,

I would suggest to do the following:

1. Create two Features, e.g. "Feature Product 1" and "Feature Product 2"

2. Create two Setup Types, e.g. "Product 1" and "Product 2".

Include the "Feature Product 1" Feature into the "Product 1" Setup Type and
the "Feature Product 2" Feature into the "Product 2" Setup Type.

3. Add all files, shortcuts, etc. Always select the "Feature" with which
you want to associate the files, shortcuts, etc.

To set the product to be installed, just use the "Set Active Setup Type"
script function. For example:

Set Active Setup Type to "Product 1"

I have attached a demo script and a screenshot. Please compile and run the
project in TEST MODE!!!

In the Password Dialog, enter "Product 1" in the password field and the
installer will install Product 1. Or enter "Product 2" to install Product
2. It does not accept other passwords.

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.5
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
07-10-2007, 07:36 AM
Hi Friedrich,

Just curious... Are you adding all of this kind of stuff in these newsgroup
msg's into your "tips and tricks" thing you are making??? Seems like a good
idea to me.

--
---
Best Regards,
Earl R Coker
www.kwiksystems.net
www.kwiksystems.com
www.kwiksystems.net/appshell/index.htm
www.kwiksystems.com/clarion.htm (BigTamer(tm) Templates)

NewsArchive
07-10-2007, 07:36 AM
Hi Earl,

Yes! And (much) more ;-)

Friedrich

NewsArchive
07-10-2007, 08:08 AM
That's working pretty good, now just one other question... how can I easily
change the verbiage on the select install folder dialog box? Is it possible
to change the variables like #DLG_DESTINATION_TITLE#?
Lisa

NewsArchive
07-10-2007, 08:20 AM
Lisa,

Perfect, thank you!!

1. Create a new variable. For example:

Set Variable %INSTALLFOLDERVAR% to "This and that"

2. Open the "Select Install Folder Dialog Properties"

3. Click the "ID=" button for Title

4. Click Edit button

5. Enter %INSTALLFOLDERVAR% in the Value field

This will display the %INSTALLFOLDERVAR% value in the title now. You can
set the value for that variable wherever you want.

Does this help?

Friedrich