+ Reply to Thread
Results 1 to 8 of 8

Thread: SB5 Backup Directory created on fresh install

  1. #1

    Default SB5 Backup Directory created on fresh install

    When a client installs our product on a clean machine i.e. he/she hasn't installed this product ever before, the backup directory is still created. Why is this? And how do we stop this from happening?

    NB. We do not want the backup directory not to be created if its not a clean install, only if its for the very first time.

    Garth

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: SB5 Backup Directory created on fresh install

    Garth,

    The following line in your script creates the backup folder:

    ! %SB_BACKUPDIR% holds the path that all backup files will be copied to when overwritten
    Set Variable %_SB_BACKUPDIR% to "%_SB_INSTALLDIR%\BACKUP"

    Does this help?

  3. #3

    Default Re: SB5 Backup Directory created on fresh install

    Not really. I only want the backup directory to be created if the product has been installed before on the particular machine. If its being installed for the first time the backup shouldn't be created (because there are no files to backup).

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: SB5 Backup Directory created on fresh install

    Garth,

    Just check if your application is already there (e.g. if the installation folder already exists, etc.) and then use an If..Then Statement to create/or not create the backup folder ;-)

    HTH,

  5. #5

    Default Re: SB5 Backup Directory created on fresh install

    Hi

    Sorry for the late reply.
    I've tried what you suggested in your last comment. It still doesn't work. Here's a snippet of what I have:

    [ Initialize Setup ]
    ! %SB_BACKUPDIR% holds the path that all backup files will be copied to when overwritten
    If [INSTALLDIR] Folder exists Then
    Set Variable %_SB_BACKUPDIR% to [INSTALLDIR]\BACKUP
    End

    ! Important: Initialize default install folder and program group variables
    Set Variable %_SB_INSTALLDIR% to [INSTALLDIR]
    Set Variable %_SB_PROGRAMGROUP% to [PRODUCTNAME]


    When does this check if the folder exists occur? To me it seems as if its firing after the [Create Folders] section.

  6. #6
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: SB5 Backup Directory created on fresh install

    Garth,

    [INSTALLDIR] is a compiler variable. Please use the %_SB_INSTALLDIR% runtime variable in your If Statement!

    Does this help?

    BTW, if you "disable" the backup folder and the installer has to replace (for whatever reason) an existing file, no backup is created and rollback does not work any longer!

  7. #7

    Default Re: SB5 Backup Directory created on fresh install

    The %_SB_INSTALLDIR% hasn't been initialised when the check is done, so it will always fail and never create the backup folder. That's why used the [INSTALLDIR] variable to check.

    I only want the backup folder not to be created if the product has never been installed before.

  8. #8
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: SB5 Backup Directory created on fresh install

    Garth,

    Then create your own variable ;-) For example:

    Set Variable %DIRTEST% to [INSTALLDIR]
    If %DIRTEST% Folder exists Then
    etc.

    Does this help?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. WebUpdate & install directory
    By timbojones in forum SetupBuilder
    Replies: 1
    Last Post: 11-02-2006, 04:58 PM
  2. Best way to restore deleted files if install is aborted?
    By ljwilson in forum SetupBuilder 'How Do I' Questions
    Replies: 3
    Last Post: 04-20-2006, 08:56 AM
  3. Cannot open and compress service file - error
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 6
    Last Post: 12-06-2005, 04:40 AM
  4. Firebird Silent install
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 4
    Last Post: 04-19-2005, 09:39 AM
  5. Managing Installation Backups
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 8
    Last Post: 02-09-2005, 04:12 AM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •