PDA

View Full Version : add a password to the install & expiry date


NewsArchive
04-23-2005, 07:28 AM
[Friday, April 22, 2005 2:41 AM]

I am really struggling with the new interface and trying to find the
settings that were so readily avaialable in SB4.

1. I filled in the spot to create a password encrypted install but it
won't prompt for the password during the setup. The help file says this:

· Password Encrypted — Choose the target operating system of your
application. Depending on this setting, SetupBuilder will either create
a 32-bit, 16-bit or Internet-based setup program.

Now I am really confused!

2. My other most frequent option was setting the expiry date for the
install package to a specific date. It seems that has moved to a script
function and requires a calculation of some sort. Any chance that could
be moved back to a spin button on the project properties for the simple
minded like myself?

TIA

Parker

NewsArchive
04-23-2005, 07:29 AM
[Friday, April 22, 2005 6:50 AM]

Hi Parker,

>1. I filled in the spot to create a password encrypted install but it
>won't prompt for the password during the setup. The help file says this:
>
> · Password Encrypted — Choose the target operating system of your
>application. Depending on this setting, SetupBuilder will either create
>a 32-bit, 16-bit or Internet-based setup program.
>
>Now I am really confused!

1. Go to the "Generator" tab of the "General Information" window.
Check the "Password Encrypted Install" and then click the "Change
Password..." button to set the password.

2. From the main menu, select "View | User Interface | Dialogs"
Right click on the "Loop Wizard" and select "Add" This will bring up
the "Define Wizard Dialog" window and prompt for "Dialog Type" Select
"Password" Use the Up/Down buttons to position the dialog box
properly, I put it right after the Welcome dialog.

The second step is needed in order to add the dialog that actually
prompts for the password. If the dialog isn't there, the install
doesn't prompt for the password.

>2. My other most frequent option was setting the expiry date for the
>install package to a specific date. It seems that has moved to a script
>function and requires a calculation of some sort. Any chance that could
>be moved back to a spin button on the project properties for the simple
>minded like myself?

I find no information on how to do this in SB5. The only thing that
is in the help is in the "Generate Serial Numbers" topic:

"SetupBuilder includes a variety of features designed to help you
manage access to your software, including serial number lists and
date-based expiration."

I can't find any reference to it in the program...

Best regards,

Arnór Baldvinsson
Icetips Software
San Antonio, Texas, USA

NewsArchive
04-23-2005, 07:29 AM
[Friday, April 22, 2005 7:31 AM]

>>2. My other most frequent option was setting the expiry date for the
>>install package to a specific date. It seems that has moved to a script
>>function and requires a calculation of some sort. Any chance that could
>>be moved back to a spin button on the project properties for the simple
>>minded like myself?
>
>I find no information on how to do this in SB5. The only thing that
>is in the help is in the "Generate Serial Numbers" topic:

I was thinking about that, too. I've never done it, but the idea of an
install that expires and prompts the user to go download the latest release
is interesting.

Ok, it's trivial in script. Using GetSystemInfo(Current Date) and a
comparison with a hard coded future date is all it takes.

The attached install prevents installation after 01-Jan-2005. Change the hard
coded date and the user never knows the difference.

--
Best regards,

Mark

NewsArchive
04-23-2005, 07:29 AM
[Friday, April 22, 2005 9:24 AM]

Hi Arnór,

There is a "Validate Serial Number 1.sb5" demo script located in the
\Examples folder :)

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-23-2005, 07:30 AM
[Saturday, April 23, 2005 12:56 AM]

Arnor:

Thanks for this but?
> 1. Go to the "Generator" tab of the "General Information" window.
> Check the "Password Encrypted Install" and then click the "Change
> Password..." button to set the password.
>

Did this, keyed it in twice as required.

> 2. From the main menu, select "View | User Interface | Dialogs"
> Right click on the "Loop Wizard" and select "Add" This will bring up
> the "Define Wizard Dialog" window and prompt for "Dialog Type" Select
> "Password" Use the Up/Down buttons to position the dialog box
> properly, I put it right after the Welcome dialog.
>

Under the View Menu I don't have a User Interface option but I found the
dialogs area and added the password prompt. Not sure if we have
different versions or not but I am using the Developer Edition v5.0.113

> The second step is needed in order to add the dialog that actually
> prompts for the password. If the dialog isn't there, the install
> doesn't prompt for the password.
>
>

It now asks me for the password but I can key anything I like in there
and it will proceed with the install!!!

>>2. My other most frequent option was setting the expiry date for the
>>install package to a specific date. It seems that has moved to a script
>>function and requires a calculation of some sort. Any chance that could
>>be moved back to a spin button on the project properties for the simple
>>minded like myself?
>
>
> I find no information on how to do this in SB5. The only thing that
> is in the help is in the "Generate Serial Numbers" topic:
>
There are examples of scripts for this, I guess I had better buckle down
and study both of them!!!

Thanks you again for the helping hand, much appreciated.

Regards

Parker

NewsArchive
04-23-2005, 07:30 AM
[Friday, April 22, 2005 9:24 AM]

Parker,

You can find sample scripts for both situations in the \Examples folder ;-)

1. Dialog Demo 2.sb5
2. Expiration Date Checking Demo.sb5

Does this help?

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-23-2005, 07:31 AM
[Saturday, April 23, 2005 12:59 AM]

Friedrich:

I'll have to look at these samples closely. Arnor had given me the steps
to make the password prompt happen but the install allowed me to key
anything in there and the install worked. I must have missed something.

I'll check the samples. At the risk of repeating myself however I must
say the old way of acomplishing these two tasks was simplicity itself!

Thanks

Parker

NewsArchive
04-23-2005, 07:31 AM
[Saturday, April 23, 2005 1:37 PM]

Parker,

> I'll check the samples. At the risk of repeating myself however I must say
> the old way of acomplishing these two tasks was simplicity itself!

The problem is that SB5 now supports more than 500 functions. Adding the
above tasks to the IDE (and displaying more information in the "General
Information screen") would make the IDE far too complex (see "Run Statement,
and some Whining" thread).

You can add password protection with only 6 lines of SetupScript code and
expiration date checking with only 10 lines of code. The SB5 compiler does
all the dirty work for you (handles the Windows events, etc. etc.).

BTW, there is no need to add any line of code to support the built-in
"Serial Number" feature (e.g. create 10,000 serial numbers and SB5 handles
serial number verification).

Hope the above makes sense.

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-23-2005, 07:31 AM
[Saturday, April 23, 2005 1:24 AM]

Friedrich:

Just took a quick look at this. It looks like I have to include a couple
lines of script to actually check for the specific password, is that
correct? It would seem that providing the password in the prompts on the
appropriate tabs does not automagically generate the script for me? Am I
missing something?

Regards

Parker

NewsArchive
04-23-2005, 07:32 AM
[Saturday, April 23, 2005 1:27 PM]

Parker,

"Password encrypted" only means the compiler encrypts the installer data
stream. It does not ask for a password.

To ask for a password, you only have to display a Password dialog and add
the following 6 lines to your Wizard Loop structure:

Define Wizard Dialog: PASSWORD (Password)

Loop Wizard
If %_SB_DIALOGID% Equals "$PASSWORDDIALOG$" Then
If %_SB_PASSWORD% Not Equals "test" Then
Message Box "Wrong Password - Try again" -- "Wrong Password"
Cycle Loop
End
End
End

That's it :) You can now decide what to do with your password. For
example, if it is "SecretCodeToInstallProfessional" then install the
Professional Edition of your software. Or "SecretCodeToInstallStandard" to
install the Standard Edition, etc., etc.

Does this help?

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-23-2005, 07:49 AM
[Saturday, April 23, 2005 2:27 PM]

friedrich linder wrote:
> The problem is that SB5 now supports more than 500 functions. Adding the
> above tasks to the IDE (and displaying more information in the "General
> Information screen") would make the IDE far too complex (see "Run Statement,
> and some Whining" thread).
>

I guees it will make me a "whinner" then but my point is that these were
features that were previously available on the project tab and now
they've been removed in favour of "new" features. As for making it far
too complex, for me its already past that point ;-)

> You can add password protection with only 6 lines of SetupScript code and
> expiration date checking with only 10 lines of code. The SB5 compiler does
> all the dirty work for you (handles the Windows events, etc. etc.).
>

Perhaps, but its 6 lines of code for every project and it doesn't look
like I can cut and paste between projects. Again, for me, because I use
these two features on nearly every project its a step backwards.

> BTW, there is no need to add any line of code to support the built-in
> "Serial Number" feature (e.g. create 10,000 serial numbers and SB5 handles
> serial number verification).
>

The question then is why can't there be "no need to add any line of code
to support" passwords and expirey dates ;-)
> Hope the above makes sense.
>
I know I've lost the battle on this one but I wanted to at least try.

Thanks

Parker

NewsArchive
04-23-2005, 07:58 AM
[Saturday, April 23, 2005 3:57 PM]

Parker,

>> The problem is that SB5 now supports more than 500 functions. Adding the
>> above tasks to the IDE (and displaying more information in the "General
>> Information screen") would make the IDE far too complex (see "Run
>> Statement, and some Whining" thread).
>>
>
> I guees it will make me a "whinner" then but my point is that these were
> features that were previously available on the project tab and now they've
> been removed in favour of "new" features. As for making it far too
> complex, for me its already past that point ;-)

Oops! Of course, it was NOT my intention to call you a "whiner" :) Just
mentioned the "whiner" thread with regards to the complexity of the General
Information screen.

>> You can add password protection with only 6 lines of SetupScript code and
>> expiration date checking with only 10 lines of code. The SB5 compiler
>> does all the dirty work for you (handles the Windows events, etc. etc.).
>>
>
> Perhaps, but its 6 lines of code for every project and it doesn't look
> like I can cut and paste between projects. Again, for me, because I use
> these two features on nearly every project its a step backwards.
>
>> BTW, there is no need to add any line of code to support the built-in
>> "Serial Number" feature (e.g. create 10,000 serial numbers and SB5
>> handles
>> serial number verification).
>>
>
> The question then is why can't there be "no need to add any line of code
> to support" passwords and expirey dates ;-)
>> Hope the above makes sense.
>>
> I know I've lost the battle on this one but I wanted to at least try.

You only have to write this *once* and add it to an include script ;-)

For example, you need the expiration date checking feature in one of your
scripts - just include your "Check expiration date.sbi" include script
(one line of "drag and drop" code) and and you are done.

Does this help?

Thanks,
Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-23-2005, 08:25 AM
[Saturday, April 23, 2005 4:18 PM]

Friedrich:

Thank you. I think I had best read all of the docs and practice a little
more before jumping on the bandwagon here. The include thingy might ease
my anxiety quite a bit.

Thanks again for putting up with my questions.

Regards

Parker

NewsArchive
04-23-2005, 08:25 AM
[Saturday, April 23, 2005 4:23 PM]

Parker,

Documentation is still under heavy development and I can learn from your
questions :) BTW, it's not easy to describe the concept behind SB5... <g>

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-23-2005, 08:26 AM
[Saturday, April 23, 2005 4:06 PM]

> Perhaps, but its 6 lines of code for every project and it doesn't look
> like I can cut and paste between projects.

BTW, of course, it is possible to "copy and paste" between projects :)

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-23-2005, 08:26 AM
[Saturday, April 23, 2005 4:19 PM]

Parker,

I have created a simple demo and include script for you (see attached
files).

1. Please unzip "Expiration Date Checking (include).zip" into your SB5
\Include folder
2. Unzip "Expiration Date Demo 2.zip" into your SB5 \Examples folder.

Please start SB5 and open "Expiration Date Demo 2.sb5" from within your
\Examples folder. Go to the Script Editor. You'll see only one line
that does the expiration date checking:

#include script "Expiration Date Checking.sbi"

Now go to the Compiler Variables screen. There are two compiler variables:

[EXP_DATECREATED] = 20041230
[EXP_VALIDITY] = 20

You only have to change the above to handle expiration date checking in all
of your projects.

What do you think? And if you don't like our way of handling Expiration
Dates, you can modify the include script or create your own. This gives
you maximum power and flexibility!

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-24-2005, 04:26 AM
[Saturday, April 23, 2005 5:13 PM]

>> Perhaps, but its 6 lines of code for every project and it doesn't look
>> like I can cut and paste between projects.
>
>BTW, of course, it is possible to "copy and paste" between projects :)

Friedrich,

Are you sure? I cannot reliably copy/paste between two includes in the same
project. Sometimes it works, but more frequently it fails. Last night I even
tried with the context menu. Selected a block in an include, right-click and
select Copy. Moved to the other include, right-click and Paste was disabled.

--
Best regards,

Mark

NewsArchive
04-24-2005, 04:28 AM
[Sunday, April 24, 2005 12:28 PM]

Mark,

I am using it every day :) Can you reproduce where and when it fails? All
our internal test scripts were build using copy and paste.

Thanks,
Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-24-2005, 04:29 AM
[Saturday, April 23, 2005 5:34 PM]

Friedrich:

Now that's service!!!

Above and beyond the call of duty, thank you. I'll make maximum use of this.

Regards

Parker

NewsArchive
04-24-2005, 04:36 AM
[Saturday, April 23, 2005 6:57 PM]

Hi Friedrich,

>Loop Wizard
> If %_SB_DIALOGID% Equals "$PASSWORDDIALOG$" Then
> If %_SB_PASSWORD% Not Equals "test" Then
> Message Box "Wrong Password - Try again" -- "Wrong Password"
> Cycle Loop
> End
> End
>End
>
>That's it :)

I just add the Password dialog. I don't add any code to make it work.

Best regards,

Arnór Baldvinsson
Icetips Software
San Antonio, Texas, USA

NewsArchive
04-24-2005, 04:36 AM
[Saturday, April 23, 2005 7:21 PM]

Arnor:

Did you try keying in something other than the password when running the
install program? Without Friedrich's code I think it will work no matter
what you key in there.

Regards

Parker

NewsArchive
04-24-2005, 04:37 AM
[Saturday, April 23, 2005 9:32 PM]

Hi Parker,

>Did you try keying in something other than the password when running the
>install program? Without Friedrich's code I think it will work no matter
>what you key in there.

_nothing_ except the correct password allows me to go to the next
window.

Aha, found it! You MUST check the "Auto-veryfy Password" on the
"Advanced" tab of the "Password Dialog Properties" window! _THAT_ is
the trick to get it to work. With it checked you do not need to write
any script code to make it work correctly:)

Best regards,

Arnór Baldvinsson
Icetips Software
San Antonio, Texas, USA

NewsArchive
04-24-2005, 04:37 AM
[Sunday, April 24, 2005 12:31 PM]

Arnór,

I NEED VACATION!!!!!!!!!!!!!!!!!!! <g> You are absolutely right. Of
course, SB5 can verify a password without my code. Thank you for your post!

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-24-2005, 04:38 AM
[Sunday, April 24, 2005 12:35 PM]

Parker,

I am sorry for my incorrect reply. See Arnór's answer - you only have to
mark the "Auto-verify Password" checkbox on the "Advanced" tab of the
"Password Dialog Properties" window. Thanks Arnór.

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-25-2005, 03:52 AM
[Sunday, April 24, 2005 5:54 PM]

>Mark,
>
>I am using it every day :) Can you reproduce where and when it fails? All
>our internal test scripts were build using copy and paste.

Friedrich,

Not reliably, which is why I never mentioned it before.

--
Best regards,

Mark

NewsArchive
04-25-2005, 03:52 AM
[Sunday, April 24, 2005 6:06 PM]

Mark,

Okay, thanks! I'll check the source code.

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-25-2005, 03:53 AM
[Sunday, April 24, 2005 5:49 PM]

Hi Friedrich,

>I NEED VACATION!!!!!!!!!!!!!!!!!!! <g> You are absolutely right. Of
>course, SB5 can verify a password without my code. Thank you for your post!

Ok;)

Now, this is an example of certain level of complexity that the SB5
IDE has that IMO can get confusing - so much so that even you don't
remember exactly how to do it, even though you pointed these steps out
to me couple of months ago<bg>

So, in order to add a password protection to an install, there are 3
steps that are required:

1. Go to the "Generator" tab of the "General Information" window.
Check the "Password Encrypted Install" and then click the "Change
Password..." button to set the password.

2. From the main menu, select "View | User Interface | Dialogs"
Right click on the "Loop Wizard" and select "Add" This will bring up
the "Define Wizard Dialog" window and prompt for "Dialog Type" Select
"Password" Use the Up/Down buttons to position the dialog box
properly, I put it right after the Welcome dialog.

3. Make sure that you check the "Auto-veryfy Password" on the
"Advanced" tab of the "Password Dialog Properties" window!

The 3 steps isn't bad, but the fact that we have to do them in 3
different places makes this fairly simple process quite confusing.
IMO, when step 1 is completed and a password has been entered, step 2
and step 3 should be automatically created by the IDE because without
them step 1 doesn't do anything. Even with step 2 you still don't
have password protection, only password dialog. Also when you create
the Password dialog the "Auto-verify Password" should be checked by
default, at least if a password has been created in step 1.

Also, when you have entered a password in the "Password Dialog
Properties" I think the "Auto-verify Password" should be turned on
automatically. I don't really see the meaning with it being unchecked
since the whole meaning of a password dialog is to require a password.
So why should it not be required and verified automatically? If you
want to do it manually, you can uncheck it and handle it manually. I
would guess that in 99% cases people would want the program to handle
it automatically.

I _think_ you can actually skip step 1 and add the password and
require it in step 2 where you create the dialog box. It would be
nice when you create a dialog that the property window popped up
automatically with the newly created entry. As it is now, you add the
dialog, then you need to find it because the hightlight is not put on
the created item, then double click on it to edit it (Enter key does
not work in the Dialog pane, neither does the Insert key. The Delete
key works there - version 5.0.1113)

Best regards,

Arnór Baldvinsson
Icetips Software
San Antonio, Texas, USA

NewsArchive
04-25-2005, 03:53 AM
[Sunday, April 24, 2005 6:05 PM]

Hi Arnór,

"Step 1" is not required because this has nothing to do with the password
feature ;-) Not in the documentation yet. It gives you an option to
encrypt the data stream.

So you only need "Step 2" and "Step 3". The password is defined in Step 2.

The "Auto-verify Password" checkbox is not marked by default because quite a
few people use SB5 to install different editions of their software with SB5.
If Password = Yada1 then install "Edition A", if Password = Yada2 then
install "Edition B" Else install "Demo Edition", etc.

And other people use the Password dialog to let the end-user enter a
password for a database or server, etc. In this case, password verification
would not make any sense. So it always depends on your needs <g>

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-25-2005, 03:54 AM
[Monday, April 25, 2005 12:01 AM]

Hi Friedrich,

>"Step 1" is not required because this has nothing to do with the password
>feature ;-) Not in the documentation yet. It gives you an option to
>encrypt the data stream.

Thanks for correcting that.

>So you only need "Step 2" and "Step 3". The password is defined in Step 2.

You have to open the "Password Dialog Properties" window to add the
password. You can add the dialog without adding a password. The
order of prompts on the PDP window is also not very logical. It is a
window to add a password to the setup and the password and it's
necessary settings are on the "Advanced" tab. IMO they should be on
the "General" tab. For me this just includes too much digging through
the IDE to find things, that should be easy to find.

>The "Auto-verify Password" checkbox is not marked by default because quite a
>few people use SB5 to install different editions of their software with SB5.
>If Password = Yada1 then install "Edition A", if Password = Yada2 then
>install "Edition B" Else install "Demo Edition", etc.
>
>And other people use the Password dialog to let the end-user enter a
>password for a database or server, etc. In this case, password verification
>would not make any sense. So it always depends on your needs <g>

I'm starting to understand where the problem lies. SB5 can have any
kind of password dialog. This is great, but it means that users
coming from SB4, which only had an option to password protect the
INSTALL, are going to be confused, just as I have been. IMO, this
process just doesn't make sense for password protecting an install.
The "Auto-verify Password" option is also confusing. As far as I can
tell it would only be checked on if the purpose of the password dialog
is to protect the install, then it should convey that information. It
doesn't. If it read something like "Protect install with password"
then it would be much less confusing.

Maybe there should be a special password dialog for protecting the
install and then the general password dialog for the rest? That way
you could have a "Password" dialog and "Password protect Install"
dialog. That would have the "Protect install with password" checked.
Then the other password window might not need that option at all.

Best regards,

Arnór Baldvinsson
Icetips Software
San Antonio, Texas, USA

NewsArchive
04-25-2005, 03:56 AM
[Monday, April 25, 2005 11:56 AM]

Hi Arnór,

Thank you. I have completely removed the "Password Encrypted Install"
checkbox option from the General Information screen now and I have also
"revamped" the Dialog Properties windows. SB5 RC2 will be available later
today.

Thank you for your comments.

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-25-2005, 07:47 AM
[Monday, April 25, 2005 3:22 PM]

Will this affect the Pro version as well?

Sim

NewsArchive
04-25-2005, 07:48 AM
[Monday, April 25, 2005 3:27 PM]

Yes!

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-26-2005, 03:21 AM
[Monday, April 25, 2005 6:59 PM]

Friedrich, do you EVER sleep? ;-)

Sim

NewsArchive
04-26-2005, 03:22 AM
[Monday, April 25, 2005 6:57 PM]

Hi Friedrich,

>Thank you. I have completely removed the "Password Encrypted Install"
>checkbox option from the General Information screen now and I have also
>"revamped" the Dialog Properties windows. SB5 RC2 will be available later
>today.

Can you explain what the "Password Encrypted Install" does? I can't
see it in SB4 so I guess it was something new in SB5??? I always read
it as meaning "Password Protected Install" which it obviously is
not<g> Hence my utter confusion with this whole process - hey what
else is new?<g>

Best regards,

Arnór Baldvinsson
Icetips Software
San Antonio, Texas, USA

NewsArchive
04-26-2005, 08:52 AM
[Tuesday, April 26, 2005 4:51 PM]

Sleep is for wimps! <G> :)

Friedrich

NewsArchive
05-03-2005, 01:14 AM
It is the kid that keeps him up so he may as well code <g>

NewsArchive
05-03-2005, 01:15 AM
:) <G>

Friedrich