SetupBuilder Community  

Go Back   SetupBuilder Community > SetupBuilder Software Installation System > SetupBuilder FAQs, Tips and Techniques

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-13-2006, 08:57 AM
FAQ FAQ is offline
Junior Member
 
Join Date: Jan 2006
Posts: 16
Default #00012: How to detect and uninstall previous version?

Question:

How to detect whether an old version of you application is already installed and then offer to uninstall it automatically?

Answer:

You can use the Detect Previous Version function to you detect the path of a previously distributed version of your product. If the function succeeds, the %_SB_ERRORCODE% return value is nonzero. The return variable contains the path to the previous version. You can use Run Program to launch the uninstallation program.

Set Variable %_SB_INSTALLDIR% to Detect Previous Version ("{4D910660-BBBC-11D8-6784-02015E7D18BE}")
If %_SB_ERRORCODE% Equals "1" Then
Display Message Box "The installer has detected a previous SB5 installa..." -- "Previous Version Detected"
If %_SB_RETURN% Equals "$IDYES$" Then
Run Program %_SB_INSTALLDIR%\Uninst_[PRODUCTNAME].exe /U "[UNINSTALL_LOG]" (Always Install) [Wait]
End
End


SetupBuilder Requirements:

Developer Edition. This function is not available in the Clarion or Professional versions of the SetupBuilder Installation System.
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get Setup builder to uninstall a previous version NewsArchive SetupBuilder - NNTP 3 11-09-2006 05:46 AM
Detect Previous Version sphair SetupBuilder 6 06-22-2005 08:53 AM
Uninstall previous before installing (SB5 Pro) NewsArchive SetupBuilder - NNTP 6 05-14-2005 08:21 AM
SB5 Professional Edition (build# 1020) NewsArchive SetupBuilder - NNTP 2 01-22-2005 09:03 AM


All times are GMT -6. The time now is 11:16 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004-2012 Lindersoft