PDA

View Full Version : Web Update Install - Previous Version Detect



NewsArchive
08-20-2009, 01:54 AM
Does anything have some simple script editor code that I can add to a web
update install so I can detect a specific previous version number - this
previous version number or less in value - DO not web update.

I have looked at the example detect previous version projects, and have
created a separate conversion install from one of the examples, and
incorporated some of that code in my soon to be released - Product Scope
7.9 install

but so far, I have not successfully found the right combination for:

detect a specific previous version number - this previous version number or
less in value - DO not web update.

David

--
From David Troxell - Product Scope 7.8 - Encourager Software
Product Scope 7 Viewer - NO Registration Fee! Free to Use!
http://www.encouragersoftware.com/
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
http://www.profileexchanges.com/blog/

NewsArchive
08-20-2009, 01:55 AM
David,

Is your challenge in getting the existing version number, or deciding
whether to update?

If you have both version numbers, you can use an if/then to compare them as
in the attached.

Jane

NewsArchive
08-20-2009, 01:56 AM
> David,
>
> Is your challenge in getting the existing version number, or deciding
> whether to update?

Jane,

Thanks for responding,

OK, the result I need is this - If the version number from previous install
is 7.5.337 or less, I need the web update program to halt and display a
message (previous install with 7.5.337 or earlier previous version cannot
be installed with web update method).

Using example script code in one of the detect previous version projects, I
can get the proper previous version to display, but I can't seem to create
the right variable that actually reads that previous version number and
then applies the Exit installation control statement to it.

David

--
From David Troxell - Product Scope 7.8 - Encourager Software
Product Scope 7 Viewer - NO Registration Fee! Free to Use!
http://www.encouragersoftware.com/
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
http://www.profileexchanges.com/blog/

NewsArchive
08-20-2009, 01:57 AM
> Using example script code in one of the detect previous version projects, I
> can get the proper previous version to display, but I can't seem to create
> the right variable that actually reads that previous version number and
> then applies the Exit installation control statement to it.

David,

When you use "Detect Previous Version" it will automatically populate two
SetupBuilder variables for you.

%_SB_RETURNEX% will be a string that contains the version number.

%_SB_TMP% will be a full path to the uninstaller.

In the attached screen shot you can see how we used this in the new release
of ProImage to detect that a 1.x version of the product was installed.

We offer a dialog to the user offering to uninstall it for them, and then
if they confirm that action we use the "Run Command Line" option to launch
the uninstaller.

You should be able to examine the %_SB_RETURNEX% after your call to "Detect
Previous Version" and then evaluate what actions you need to take.

Does that help?

Charles



--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - "Get ProPath, make your Clarion programs ready
for Windows 7 and Vista!"
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
08-20-2009, 01:58 AM
>> Using example script code in one of the detect previous version projects, I
>> can get the proper previous version to display, but I can't seem to create
>> the right variable that actually reads that previous version number and
>> then applies the Exit installation control statement to it.
>
> David,
>
> When you use "Detect Previous Version" it will automatically populate two
> SetupBuilder variables for you.
>
> %_SB_RETURNEX% will be a string that contains the version number.

Charles,

I was REALLY CLOSE on this one - but your post helped me to go back and
look more closely at the conditions - THAT is where I missed it before.

The If statement I display in the screen shot shows how I got it to work.

If %_SB_RETURNEX% Version Less Than "7.8.377" Then
Exit Installation ()
End

I placed this right after - installer has successfully detected previous
install (good place to let users know, if certain version or less is
detected the install will end)

To others, this is where I copied the code from:

Detect Previous Application B.sb7

With my addition.

Thanks - Charles!

David

--
From David Troxell - Product Scope 7.8 - Encourager Software
Product Scope 7 Viewer - NO Registration Fee! Free to Use!
http://www.encouragersoftware.com/
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
http://www.profileexchanges.com/blog/

NewsArchive
08-20-2009, 01:59 AM
> On 19 Aug 2009 22:46:19 -0400, Charles Edmonds wrote:
> Thanks - Charles!

Your welcome!

:-)

Charles

--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - "Get ProPath, make your Clarion programs ready
for Windows 7 and Vista!"
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
08-20-2009, 01:59 AM
David,

This is what I simply do for DMC :
In the installer (and in the updater) I write the version installed in registry HKLM
When the app starts I read HKLM and copy to HKCU

Now when the updater is called from the app I use a small independant SB written exe to get the web version online
Then I read in HKCU the installed version and compare

Then it is easy to handle all the rest .....

Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

DMC - Data Management Center
A tool to let you Migrate Import Export Transfer your Data
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" &
"Works with Windows Server 2008"

NewsArchive
08-20-2009, 02:00 AM
> David,
>
> This is what I simply do for DMC :
> In the installer (and in the updater) I write the version installed in registry HKLM
> When the app starts I read HKLM and copy to HKCU

JP,

Thanks, but I found for what I needed, all I needed to do was:

Copy and paste the code from Detect Previous Application B.sb7

Season to taste and add:

If %_SB_RETURNEX% Version Less Than "7.8.377" Then
Exit Installation ()
End

The same code can be placed in main install and web update SB project and
works very well!

David

--
From David Troxell - Product Scope 7.8 - Encourager Software
Product Scope 7 Viewer - NO Registration Fee! Free to Use!
http://www.encouragersoftware.com/
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
http://www.profileexchanges.com/blog/